Re: Error while applying interval on a postgresql query

2017-06-09 Thread Rahul Raj
It works fine on csv/parquet files. Issue happens on rdbms tables. On Jun 10, 2017 04:48, "Boaz Ben-Zvi" wrote: > This works fine on a json table: > > 0: jdbc:drill:zk=local> select * from dfs.`/data/test2.json` where > DATE_ADD(CAST(START_DATE as DATE),interval '1' second) < CAST(CURRENT_DATE

Re: Error while applying interval on a postgresql query

2017-06-09 Thread Boaz Ben-Zvi
This works fine on a json table: 0: jdbc:drill:zk=local> select * from dfs.`/data/test2.json` where DATE_ADD(CAST(START_DATE as DATE),interval '1' second) < CAST(CURRENT_DATE as DATE); +-+-+ | id | start_date | +-+-+ | 1 | 1997-10-27 | | 2 | 1997-10-27 | |

Re: Error while applying interval on a postgresql query

2017-06-07 Thread Rahul Raj
Any thoughts why this could be happening? It happens on 1.10 /Oracle combination too, and looks like its related with Calcite. >From what I experience, Drill fails on any date manipulation in the where part while querying on a table from JDBC Storage plugin. This query works fine - select DATE_AD

Re: Error while applying interval on a postgresql query

2017-03-20 Thread Rahul Raj
This happens on a JDBC Storage plugin to Postgres. It errors out on cast/DATE_ADD function call. Regards, Rahul On Tue, Mar 21, 2017 at 2:33 AM, Boaz Ben-Zvi wrote: > What do you mean by ‘postrgresql table’ ? > > I just retried the query below (on a json table) and it worked OK: > > > > 0: jd

Re: Error while applying interval on a postgresql query

2017-03-20 Thread Boaz Ben-Zvi
What do you mean by ‘postrgresql table’ ? I just retried the query below (on a json table) and it worked OK: 0: jdbc:drill:zk=local> select * from test2 limit 2; +-+-+ | id | start_date | +-+-+ | 1 | 1997-10-27 | | 2 | 1997-10-27 | +-+

Error while applying interval on a postgresql query

2017-03-20 Thread Rahul Raj
Hi, Drill 1.9 gives error while applying interval function on a postgresql table. The below two queries error out. Not sure about the other databases. select `id` from (select * from config_1.public.project_release) where CAST(DATE_ADD(`start_date`,interval '19800' second(5)) AS DATE) = DATE '201