You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by anil gupta <an...@gmail.com> on 2014/05/02 01:58:07 UTC

in Squirell for Unsigned_Date Type columns

Hi All,

I have Unsigned_Date Type columns in my phoenix tables. Squirell is unable
to display the values. Instead of value it displays : "<UnknownType (19)>"
What is the reason Squirell is unable to show that column? Can anyone tell
me how to fix this problem(without changing the columns to Date)?

-- 
Thanks & Regards,
Anil Gupta

Re: in Squirell for Unsigned_Date Type columns

Posted by anil gupta <an...@gmail.com>.
Ok..Gabreil was spot on about the problem of using Phoenix-client.jar when
its not present in the lib directory of Squirell.

I had an old jar of phoenix-client in lib folder of Squirell and i also
added new phoenix-client in extra classpath and i was under impression that
client jar in extra classpath is being used. However, in reality client jar
under lib folder was being used.

After updating the client jar under lib folder, i can set the Unsigned_date
correctly. The trick works. :) . I'll create the patch and submit it.



On Wed, May 7, 2014 at 4:31 PM, anil gupta <an...@gmail.com> wrote:

> Hi James,
>
> I  tried the trick that you told me and still Squirell is complaining
> about "<UnknownType (19)>". I only modified PDataType for UNSIGNED_DATE. Do
> i need to modify any other class? Would you mind checking a UNSIGNED_DATE
> column in Squirell on your setup. Maybe, i am doing something wrong.
>
> Thanks,
> Anil
>
>
> On Thu, May 1, 2014 at 7:01 PM, James Taylor <ja...@apache.org>wrote:
>
>> Hi Anil,
>> The reason is that there is no standard unsigned date SQL type that
>> Phoenix can map to, so Squirrel does not know how to interpret this type.
>> An easy fix should be to override the following method in PDataType for
>> UNSIGNED_DATE, UNSIGNED_TIME, and UNSIGNED_TIMESTAMP like this (returning
>> the corresponding regular type which SQuirrel will understand):
>>
>>
>>         @Override
>>         public int getResultSetSqlType() {
>>             return DATE.getResultSetSqlType();
>>         }
>>
>> Would you mind giving this a try and if successful send us a patch? We
>> should be able to get it into our upcoming 3.1/4.1 release.
>>
>> Thanks,
>> James
>>
>>
>> On Thu, May 1, 2014 at 4:58 PM, anil gupta <an...@gmail.com> wrote:
>>
>>> Hi All,
>>>
>>> I have Unsigned_Date Type columns in my phoenix tables. Squirell is
>>> unable
>>> to display the values. Instead of value it displays : "<UnknownType
>>> (19)>"
>>> What is the reason Squirell is unable to show that column? Can anyone
>>> tell
>>> me how to fix this problem(without changing the columns to Date)?
>>>
>>> --
>>> Thanks & Regards,
>>> Anil Gupta
>>>
>>
>>
>
>
> --
> Thanks & Regards,
> Anil Gupta
>



-- 
Thanks & Regards,
Anil Gupta

Re: in Squirell for Unsigned_Date Type columns

Posted by anil gupta <an...@gmail.com>.
Hi James,

I  tried the trick that you told me and still Squirell is complaining about
"<UnknownType (19)>". I only modified PDataType for UNSIGNED_DATE. Do i
need to modify any other class? Would you mind checking a UNSIGNED_DATE
column in Squirell on your setup. Maybe, i am doing something wrong.

Thanks,
Anil


On Thu, May 1, 2014 at 7:01 PM, James Taylor <ja...@apache.org> wrote:

> Hi Anil,
> The reason is that there is no standard unsigned date SQL type that
> Phoenix can map to, so Squirrel does not know how to interpret this type.
> An easy fix should be to override the following method in PDataType for
> UNSIGNED_DATE, UNSIGNED_TIME, and UNSIGNED_TIMESTAMP like this (returning
> the corresponding regular type which SQuirrel will understand):
>
>
>         @Override
>         public int getResultSetSqlType() {
>             return DATE.getResultSetSqlType();
>         }
>
> Would you mind giving this a try and if successful send us a patch? We
> should be able to get it into our upcoming 3.1/4.1 release.
>
> Thanks,
> James
>
>
> On Thu, May 1, 2014 at 4:58 PM, anil gupta <an...@gmail.com> wrote:
>
>> Hi All,
>>
>> I have Unsigned_Date Type columns in my phoenix tables. Squirell is unable
>> to display the values. Instead of value it displays : "<UnknownType (19)>"
>> What is the reason Squirell is unable to show that column? Can anyone tell
>> me how to fix this problem(without changing the columns to Date)?
>>
>> --
>> Thanks & Regards,
>> Anil Gupta
>>
>
>


-- 
Thanks & Regards,
Anil Gupta

Re: in Squirell for Unsigned_Date Type columns

Posted by James Taylor <ja...@apache.org>.
Hi Anil,
The reason is that there is no standard unsigned date SQL type that Phoenix
can map to, so Squirrel does not know how to interpret this type. An easy
fix should be to override the following method in PDataType for
UNSIGNED_DATE, UNSIGNED_TIME, and UNSIGNED_TIMESTAMP like this (returning
the corresponding regular type which SQuirrel will understand):


        @Override
        public int getResultSetSqlType() {
            return DATE.getResultSetSqlType();
        }

Would you mind giving this a try and if successful send us a patch? We
should be able to get it into our upcoming 3.1/4.1 release.

Thanks,
James


On Thu, May 1, 2014 at 4:58 PM, anil gupta <an...@gmail.com> wrote:

> Hi All,
>
> I have Unsigned_Date Type columns in my phoenix tables. Squirell is unable
> to display the values. Instead of value it displays : "<UnknownType (19)>"
> What is the reason Squirell is unable to show that column? Can anyone tell
> me how to fix this problem(without changing the columns to Date)?
>
> --
> Thanks & Regards,
> Anil Gupta
>

Re: in Squirell for Unsigned_Date Type columns

Posted by James Taylor <ja...@apache.org>.
Hi Anil,
The reason is that there is no standard unsigned date SQL type that Phoenix
can map to, so Squirrel does not know how to interpret this type. An easy
fix should be to override the following method in PDataType for
UNSIGNED_DATE, UNSIGNED_TIME, and UNSIGNED_TIMESTAMP like this (returning
the corresponding regular type which SQuirrel will understand):


        @Override
        public int getResultSetSqlType() {
            return DATE.getResultSetSqlType();
        }

Would you mind giving this a try and if successful send us a patch? We
should be able to get it into our upcoming 3.1/4.1 release.

Thanks,
James


On Thu, May 1, 2014 at 4:58 PM, anil gupta <an...@gmail.com> wrote:

> Hi All,
>
> I have Unsigned_Date Type columns in my phoenix tables. Squirell is unable
> to display the values. Instead of value it displays : "<UnknownType (19)>"
> What is the reason Squirell is unable to show that column? Can anyone tell
> me how to fix this problem(without changing the columns to Date)?
>
> --
> Thanks & Regards,
> Anil Gupta
>