phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Taylor <jamestay...@apache.org>
Subject Re: Delete from table issue in phoenix-2.2.3
Date Tue, 25 Feb 2014 19:06:17 GMT
Thanks for the info, Skanda. Would you mind filing a JIRA and we'll get
this fixed up? It'd be helpful if you include a unit test if possible.

Thanks,
James


On Mon, Feb 24, 2014 at 10:21 PM, Skanda <skanda.ganapathy@gmail.com> wrote:

> Hi,
>
> For the query delete from test where "v2"='dummy';
> the field v2 alone is being passed with double-quotes to NamedNode(String
> name).
> Other primary keys of the table (k1,k2 in my case) are not being
> double-quoted, hence the normalizeIdentifier converts them into upper-case.
>
> Regards,
> Skanda
>
>
> On Tue, Feb 25, 2014 at 10:52 AM, Skanda <skanda.ganapathy@gmail.com>wrote:
>
>> Hi James,
>>
>> I don't have any secondary indexes for the table. There is no difference
>> with NO_INDEX also, anyways.
>>
>> delete /*+ NO_INDEX */ from test where "v2"='dummy';
>>
>> Error: ERROR 504 (42703): Undefined column. columnName=K1
>> (state=42703,code=504)
>>
>> Despite having the columns in lowercase, the getColumn(String name) in
>> PTableImpl always gets the column names in upper-case.
>>
>> Regards,
>> Skanda
>>
>>
>> On Mon, Feb 24, 2014 at 10:32 PM, James Taylor <jamestaylor@apache.org>wrote:
>>
>>> Do you have any secondary indexes on your tables? If so, can you try
>>> adding a /*+ NO_INDEX */ hint and let us know if the problem persists.
>>> Thanks,
>>> James
>>>
>>>
>>> On Monday, February 24, 2014, James Taylor <jamestaylor@apache.org>
>>> wrote:
>>>
>>>> Do you hav
>>>>
>>>> On Monday, February 24, 2014, Skanda <skanda.ganapathy@gmail.com>
>>>> wrote:
>>>>
>>>>> Sorry I get the below exception when I try to do a delete from table
:
>>>>>
>>>>> Error: ERROR 504 (42703): Undefined column. columnName=K1
>>>>> (state=42703,code=504)
>>>>>
>>>>> Example table : create table "test"("k1" varchar,"k2" varchar,"d"."v1"
>>>>> unsigned_int,"d"."v2" varchar CONSTRAINT pk PRIMARY KEY("k1","k2"));
>>>>>
>>>>> Query : delete from "test" where "v2"='dummy';
>>>>>
>>>>>
>>>>> On Mon, Feb 24, 2014 at 6:12 PM, Skanda <skanda.ganapathy@gmail.com>wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> The delete command doesn't work for tables and columns that are
>>>>>> defined to be in lower-case.
>>>>>>  I'm getting the following exception :
>>>>>>
>>>>>> Error: ERROR 1012 (42M03): Table undefined. tableName=test
>>>>>> (state=42M03,code=1012)
>>>>>>
>>>>>> The same works for tables and columns in upper-case.
>>>>>>
>>>>>> Example table : create table "test"(k1 varchar,k2 varchar,"d"."v1"
>>>>>> unsigned_int,"d"."v2" varchar CONSTRAINT pk PRIMARY KEY(k1,k2));
>>>>>>
>>>>>> Query : delete from "test" where "v2"='dummy';
>>>>>>
>>>>>> Regards,
>>>>>> Skanda
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>
>

Mime
View raw message