Re: Not working as expected

2016-11-22 Thread Vivek Paranthaman
Hi Sergey, It retrieves null in ResultSet...! Any other solution? On Wed, Oct 26, 2016 at 6:12 AM, Sergey Soldatov wrote: > Hi Vivek, > You may use meta information for the connection. Once you created > connection using Phoenix jdbc-driver, you may run following code: > > ResultSet rs = > co

Re: Not working as expected

2016-10-25 Thread Sergey Soldatov
Hi Vivek, You may use meta information for the connection. Once you created connection using Phoenix jdbc-driver, you may run following code: ResultSet rs = connection.meta.getTables(connection.meta.getConnection().getCatalog(), null, "%", new String[] {"TABLE"}); Iterating over the result set y

Not working as expected

2016-10-25 Thread Vivek Paranthaman
Hi, Anybody know, how to get Schema and available tables using jdbc-driver from Hbase?

Re: to_date not working as expected

2016-02-26 Thread Binu Mathew
The patch resolved our issue. We just updated the jar file on all nodes in the cluster, and our test cases are now passing. This issue can be closed. Thank you. On Tue, Feb 2, 2016 at 3:45 PM, Thomas D'Silva wrote: > I have a patch out for PHOENIX-1769 >

Re: to_date not working as expected

2016-02-02 Thread Thomas D'Silva
I have a patch out for PHOENIX-1769 . The issue is that the jruby-complete-1.6.8.jar that is present in then hbase lib directory contains jodatime 1.6 classes which get picked up instead of the 2.7 classes that are included in the phoenix server

Re: to_date not working as expected

2016-02-02 Thread Binu Mathew
Hi Thomas, Any update on this? If and when a patch becomes available, can you please update this thread. This is a blocker: 1. We have existing HBase tables that users do not necessarily want to port over to Phoenix tables 2. Building Phoenix views to the existing HBase tables is a better soluti

Re: to_date not working as expected

2016-02-01 Thread Binu Mathew
If and when a patch becomes available, can you please update this thread. This is a blocker: 1. We have existing HBase tables that users do not necessarily want to port over to Phoenix tables 2. Building Phoenix views to the existing HBase tables is a better solution 3. The inability to cast the d

Re: to_date not working as expected

2016-01-30 Thread Thomas D'Silva
Binu, I am able to repro the issue by manually running the test from the patch from https://issues.apache.org/jira/browse/PHOENIX-1769 . I will investigate further. Thanks, Thomas On Fri, Jan 29, 2016 at 4:26 PM, Binu Mathew wrote: > That doesn't seem to work. > > Phoenix is not recognizing th

Re: to_date not working as expected

2016-01-29 Thread Binu Mathew
That doesn't seem to work. Phoenix is not recognizing that created_at in the WERE clause is a derived column from to_date("created_at_date"). Some relational databases support this type of functionality. On Fri, Jan 29, 2016 at 4:16 PM, Alok Singh wrote: > Does this work: > > select 1, to_date

Re: to_date not working as expected

2016-01-29 Thread Alok Singh
Does this work: select 1, to_date("created_at_date") as created_at from "gp_subscriptions" where created_at > to_date('2010-10-10') limit 3; Alok Alok a...@cloudability.com On Fri, Jan 29, 2016 at 3:54 PM, Binu Mathew wrote: > Thank you for the reply. > > I mistakenly wrote that we are using

Re: to_date not working as expected

2016-01-29 Thread Binu Mathew
Thank you for the reply. I mistakenly wrote that we are using Phoenix with HBase .96. This was a typo. We are using HBase .98 with Phoenix 4.4 I tried the UNSIGNED types and still encountering the same issue. My field has the following data: select "created_at_date" from "gp_subscriptions" limi

Re: to_date not working as expected

2016-01-28 Thread James Taylor
Hi Binu, Phoenix has never supported HBase 0.96, so I'm not sure where you got the release from. I recommend upgrading to a later, supported version of HBase and a later version of Phoenix. Give the 4.7.0 RC a try. One other tip in particular for views you create over existing HBase tables. Use t

to_date not working as expected

2016-01-28 Thread Binu Mathew
Phoenix version 4.4.0 Issues with Phoenix when used with HBase 0.96.0.2.0 2 Issues: *ISSUE:* to_date Function is not converting string data types in valid date formats to a DATE data type when used in the WHERE clause for date comparison. Below is a query I ran against a Phoenix view in which I

Re: TO_DATE is not working as expected

2015-05-04 Thread Siva
Thanks Gabriel, tried using JAVA and I could see time portion. Also tried (to_date(c1) - to_date(c2))*24*60*60 in phoenix shell, which resulted the difference in seconds. @Nick: I found !outputformat option in sqlline, but it does not seem like we can use this to change the output format of parti

Re: TO_DATE is not working as expected

2015-05-04 Thread James Taylor
FWIW, there's an option in sqlline that will cause it to display the full date granularity, but I don't know what it is. Maybe someone else does? Thanks, James On Mon, May 4, 2015 at 12:00 AM, Gabriel Reid wrote: > Hi Siva, > > Yes, that's pretty much correct -- TO_DATE is returning a Date value

Re: TO_DATE is not working as expected

2015-05-04 Thread Gabriel Reid
Hi Siva, Yes, that's pretty much correct -- TO_DATE is returning a Date value, which has millisecond granularity -- the fact that you're only seeing a date (with no time component) is due to the way in which the Date is formatted, and not it's internal value. - Gabriel On Sun, May 3, 2015 at 5:2

Re: TO_DATE is not working as expected

2015-05-02 Thread Siva
Any help on TO_DATE function? Thanks On Fri, May 1, 2015 at 2:49 AM, Siva wrote: > Hi, > > Phoenix TO_DATE is truncating the time portion from date while converting > the date. Do I need to change the syntax? As per the documentation syntax > seems to be correct. > > 0: jdbc:phoenix::/hbase> se

Re: TO_DATE is not working as expected

2015-05-02 Thread Siva
Hi Gabriel, Thanks for your response. You meant to say TO_DATE is actually holding the time portion but it is not able to display it sqlline? Can please correct me if I m wrong. createdate column is defined as string on lead view. Thanks, Siva. On Fri, May 1, 2015 at 3:38 AM, Gabriel Reid wro

Re: TO_DATE is not working as expected

2015-05-01 Thread Gabriel Reid
Hi Siva, The TO_DATE function returns a java.sql.Date value, and the string representation of the java.sql.Date value is what you're seeing in your sqlline session. The internal long representation of the Date value coming out of TO_DATE will represent the date to millisecond granularity however.

TO_DATE is not working as expected

2015-05-01 Thread Siva
Hi, Phoenix TO_DATE is truncating the time portion from date while converting the date. Do I need to change the syntax? As per the documentation syntax seems to be correct. 0: jdbc:phoenix::/hbase> select "createdate", to_date("createdate", '-MM-dd HH:mm:ss') from "lead" limit 5; +--