You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Sudip Mukherjee <sm...@commvault.com> on 2016/02/08 07:39:50 UTC

TIMESTAMPADD sql jdbc function execution in drill

Hi,
Are  TIMESTAMPADD / TIMESTAMPDIFF functions supported through drill? I am getting an error while running the below query

SELECT CAST(EXTRACT(YEAR FROM CAST({fn TIMESTAMPADD(SQL_TSI_YEAR,CAST(`myshare`.`mtm` AS INTEGER),{d '1970-01-01'})} AS DATE)) AS INTEGER) AS `yr_Calculation_IGIAGIIHHFEBCCIFEE_ok`
FROM `dfs.data`.`MyFileShare_2214` `myshare`
GROUP BY CAST(EXTRACT(YEAR FROM CAST({fn TIMESTAMPADD(SQL_TSI_YEAR,CAST(`myshare`.`mtm` AS INTEGER),{d '1970-01-01'})} AS DATE)) AS INTEGER)


VALIDATION ERROR: From line 3, column 55 to line 3, column 66: Column 'SQL_TSI_YEAR' not found in any table

Thanks,
Sudip



***************************Legal Disclaimer***************************
"This communication may contain confidential and privileged material for the
sole use of the intended recipient. Any unauthorized review, use or distribution
by others is strictly prohibited. If you have received the message by mistake,
please advise the sender by reply email and delete the message. Thank you."
**********************************************************************

Re: TIMESTAMPADD sql jdbc function execution in drill

Posted by Andries Engelbrecht <ae...@maprtech.com>.
Please vote for this enhancement to raise visibility in the community.

--Andries

> On Feb 8, 2016, at 12:47 AM, Sudip Mukherjee <sm...@commvault.com> wrote:
> 
> Thanks a lot for the information.
> 
> Regards,
> Sudip
> 
> From: Arina Yelchiyeva [mailto:arina.yelchiyeva@gmail.com <ma...@gmail.com>]
> Sent: 08 February 2016 PM 01:13
> To: dev@drill.apache.org <ma...@drill.apache.org>; Sudip Mukherjee
> Subject: Re: TIMESTAMPADD sql jdbc function execution in drill
> 
> Hi Sudip,
> 
> timestampadd / timestampdiff functions are not currently implemented in Drill but they are in development.
> See Jira https://issues.apache.org/jira/browse/DRILL-3610
> 
> 
> Kind regards
> Arina
> On Mon, Feb 8, 2016 at 9:29 AM Sudip Mukherjee <smukherjee@commvault.com <ma...@commvault.com><mailto:smukherjee@commvault.com <ma...@commvault.com>>> wrote:
> Thanks Khurram.
> 
> I am not sure if I am looking at the correct place. Seeing it in calcite,
> https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/SqlJdbcFunctionCall.java <https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/SqlJdbcFunctionCall.java>
> 
> I'll try to check further on the date-time functions.
> 
> Thanks,
> Sudip
> 
> -----Original Message-----
> From: Khurram Faraaz [mailto:kfaraaz@maprtech.com <ma...@maprtech.com><mailto:kfaraaz@maprtech.com <ma...@maprtech.com>>]
> Sent: 08 February 2016 PM 12:14
> To: dev@drill.apache.org <ma...@drill.apache.org><mailto:dev@drill.apache.org <ma...@drill.apache.org>>
> Subject: Re: TIMESTAMPADD sql jdbc function execution in drill
> 
> I didn't find it on the documented date time functions here https://drill.apache.org/docs/date-time-functions-and-arithmetic/ <https://drill.apache.org/docs/date-time-functions-and-arithmetic/>
> 
> On Mon, Feb 8, 2016 at 12:09 PM, Sudip Mukherjee <smukherjee@commvault.com <ma...@commvault.com><mailto:smukherjee@commvault.com <ma...@commvault.com>>>
> wrote:
> 
>> Hi,
>> Are  TIMESTAMPADD / TIMESTAMPDIFF functions supported through drill? I
>> am getting an error while running the below query
>> 
>> SELECT CAST(EXTRACT(YEAR FROM CAST({fn
>> TIMESTAMPADD(SQL_TSI_YEAR,CAST(`myshare`.`mtm` AS INTEGER),{d
>> '1970-01-01'})} AS DATE)) AS INTEGER) AS
>> `yr_Calculation_IGIAGIIHHFEBCCIFEE_ok`
>> FROM `dfs.data`.`MyFileShare_2214` `myshare` GROUP BY
>> CAST(EXTRACT(YEAR FROM CAST({fn
>> TIMESTAMPADD(SQL_TSI_YEAR,CAST(`myshare`.`mtm` AS INTEGER),{d
>> '1970-01-01'})} AS DATE)) AS INTEGER)
>> 
>> 
>> VALIDATION ERROR: From line 3, column 55 to line 3, column 66: Column
>> 'SQL_TSI_YEAR' not found in any table
>> 
>> Thanks,
>> Sudip
>> 
>> 
>> 
>> ***************************Legal Disclaimer***************************
>> "This communication may contain confidential and privileged material
>> for the sole use of the intended recipient. Any unauthorized review,
>> use or distribution by others is strictly prohibited. If you have
>> received the message by mistake, please advise the sender by reply
>> email and delete the message. Thank you."
>> **********************************************************************
> 
> 
> 
> ***************************Legal Disclaimer***************************
> "This communication may contain confidential and privileged material for the
> sole use of the intended recipient. Any unauthorized review, use or distribution
> by others is strictly prohibited. If you have received the message by mistake,
> please advise the sender by reply email and delete the message. Thank you."
> **********************************************************************
> 
> 
> 
> ***************************Legal Disclaimer***************************
> "This communication may contain confidential and privileged material for the
> sole use of the intended recipient. Any unauthorized review, use or distribution
> by others is strictly prohibited. If you have received the message by mistake,
> please advise the sender by reply email and delete the message. Thank you."
> **********************************************************************


RE: TIMESTAMPADD sql jdbc function execution in drill

Posted by Sudip Mukherjee <sm...@commvault.com>.
Thanks a lot for the information.

Regards,
Sudip

From: Arina Yelchiyeva [mailto:arina.yelchiyeva@gmail.com]
Sent: 08 February 2016 PM 01:13
To: dev@drill.apache.org; Sudip Mukherjee
Subject: Re: TIMESTAMPADD sql jdbc function execution in drill

Hi Sudip,

timestampadd / timestampdiff functions are not currently implemented in Drill but they are in development.
See Jira https://issues.apache.org/jira/browse/DRILL-3610


Kind regards
Arina
On Mon, Feb 8, 2016 at 9:29 AM Sudip Mukherjee <sm...@commvault.com>> wrote:
Thanks Khurram.

I am not sure if I am looking at the correct place. Seeing it in calcite,
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/SqlJdbcFunctionCall.java

I'll try to check further on the date-time functions.

Thanks,
Sudip

-----Original Message-----
From: Khurram Faraaz [mailto:kfaraaz@maprtech.com<ma...@maprtech.com>]
Sent: 08 February 2016 PM 12:14
To: dev@drill.apache.org<ma...@drill.apache.org>
Subject: Re: TIMESTAMPADD sql jdbc function execution in drill

I didn't find it on the documented date time functions here https://drill.apache.org/docs/date-time-functions-and-arithmetic/

On Mon, Feb 8, 2016 at 12:09 PM, Sudip Mukherjee <sm...@commvault.com>>
wrote:

> Hi,
> Are  TIMESTAMPADD / TIMESTAMPDIFF functions supported through drill? I
> am getting an error while running the below query
>
> SELECT CAST(EXTRACT(YEAR FROM CAST({fn
> TIMESTAMPADD(SQL_TSI_YEAR,CAST(`myshare`.`mtm` AS INTEGER),{d
> '1970-01-01'})} AS DATE)) AS INTEGER) AS
> `yr_Calculation_IGIAGIIHHFEBCCIFEE_ok`
> FROM `dfs.data`.`MyFileShare_2214` `myshare` GROUP BY
> CAST(EXTRACT(YEAR FROM CAST({fn
> TIMESTAMPADD(SQL_TSI_YEAR,CAST(`myshare`.`mtm` AS INTEGER),{d
> '1970-01-01'})} AS DATE)) AS INTEGER)
>
>
> VALIDATION ERROR: From line 3, column 55 to line 3, column 66: Column
> 'SQL_TSI_YEAR' not found in any table
>
> Thanks,
> Sudip
>
>
>
> ***************************Legal Disclaimer***************************
> "This communication may contain confidential and privileged material
> for the sole use of the intended recipient. Any unauthorized review,
> use or distribution by others is strictly prohibited. If you have
> received the message by mistake, please advise the sender by reply
> email and delete the message. Thank you."
> **********************************************************************



***************************Legal Disclaimer***************************
"This communication may contain confidential and privileged material for the
sole use of the intended recipient. Any unauthorized review, use or distribution
by others is strictly prohibited. If you have received the message by mistake,
please advise the sender by reply email and delete the message. Thank you."
**********************************************************************



***************************Legal Disclaimer***************************
"This communication may contain confidential and privileged material for the
sole use of the intended recipient. Any unauthorized review, use or distribution
by others is strictly prohibited. If you have received the message by mistake,
please advise the sender by reply email and delete the message. Thank you."
**********************************************************************

Re: TIMESTAMPADD sql jdbc function execution in drill

Posted by Arina Yelchiyeva <ar...@gmail.com>.
Hi Sudip,

timestampadd / timestampdiff functions are not currently implemented in
Drill but they are in development.
See Jira https://issues.apache.org/jira/browse/DRILL-3610


Kind regards
Arina

On Mon, Feb 8, 2016 at 9:29 AM Sudip Mukherjee <sm...@commvault.com>
wrote:

> Thanks Khurram.
>
> I am not sure if I am looking at the correct place. Seeing it in calcite,
>
> https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/SqlJdbcFunctionCall.java
>
> I'll try to check further on the date-time functions.
>
> Thanks,
> Sudip
>
> -----Original Message-----
> From: Khurram Faraaz [mailto:kfaraaz@maprtech.com]
> Sent: 08 February 2016 PM 12:14
> To: dev@drill.apache.org
> Subject: Re: TIMESTAMPADD sql jdbc function execution in drill
>
> I didn't find it on the documented date time functions here
> https://drill.apache.org/docs/date-time-functions-and-arithmetic/
>
> On Mon, Feb 8, 2016 at 12:09 PM, Sudip Mukherjee <smukherjee@commvault.com
> >
> wrote:
>
> > Hi,
> > Are  TIMESTAMPADD / TIMESTAMPDIFF functions supported through drill? I
> > am getting an error while running the below query
> >
> > SELECT CAST(EXTRACT(YEAR FROM CAST({fn
> > TIMESTAMPADD(SQL_TSI_YEAR,CAST(`myshare`.`mtm` AS INTEGER),{d
> > '1970-01-01'})} AS DATE)) AS INTEGER) AS
> > `yr_Calculation_IGIAGIIHHFEBCCIFEE_ok`
> > FROM `dfs.data`.`MyFileShare_2214` `myshare` GROUP BY
> > CAST(EXTRACT(YEAR FROM CAST({fn
> > TIMESTAMPADD(SQL_TSI_YEAR,CAST(`myshare`.`mtm` AS INTEGER),{d
> > '1970-01-01'})} AS DATE)) AS INTEGER)
> >
> >
> > VALIDATION ERROR: From line 3, column 55 to line 3, column 66: Column
> > 'SQL_TSI_YEAR' not found in any table
> >
> > Thanks,
> > Sudip
> >
> >
> >
> > ***************************Legal Disclaimer***************************
> > "This communication may contain confidential and privileged material
> > for the sole use of the intended recipient. Any unauthorized review,
> > use or distribution by others is strictly prohibited. If you have
> > received the message by mistake, please advise the sender by reply
> > email and delete the message. Thank you."
> > **********************************************************************
>
>
>
> ***************************Legal Disclaimer***************************
> "This communication may contain confidential and privileged material for
> the
> sole use of the intended recipient. Any unauthorized review, use or
> distribution
> by others is strictly prohibited. If you have received the message by
> mistake,
> please advise the sender by reply email and delete the message. Thank you."
> **********************************************************************

RE: TIMESTAMPADD sql jdbc function execution in drill

Posted by Sudip Mukherjee <sm...@commvault.com>.
Thanks Khurram.

I am not sure if I am looking at the correct place. Seeing it in calcite,
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/SqlJdbcFunctionCall.java 

I'll try to check further on the date-time functions.

Thanks,
Sudip

-----Original Message-----
From: Khurram Faraaz [mailto:kfaraaz@maprtech.com] 
Sent: 08 February 2016 PM 12:14
To: dev@drill.apache.org
Subject: Re: TIMESTAMPADD sql jdbc function execution in drill

I didn't find it on the documented date time functions here https://drill.apache.org/docs/date-time-functions-and-arithmetic/

On Mon, Feb 8, 2016 at 12:09 PM, Sudip Mukherjee <sm...@commvault.com>
wrote:

> Hi,
> Are  TIMESTAMPADD / TIMESTAMPDIFF functions supported through drill? I 
> am getting an error while running the below query
>
> SELECT CAST(EXTRACT(YEAR FROM CAST({fn 
> TIMESTAMPADD(SQL_TSI_YEAR,CAST(`myshare`.`mtm` AS INTEGER),{d 
> '1970-01-01'})} AS DATE)) AS INTEGER) AS 
> `yr_Calculation_IGIAGIIHHFEBCCIFEE_ok`
> FROM `dfs.data`.`MyFileShare_2214` `myshare` GROUP BY 
> CAST(EXTRACT(YEAR FROM CAST({fn 
> TIMESTAMPADD(SQL_TSI_YEAR,CAST(`myshare`.`mtm` AS INTEGER),{d 
> '1970-01-01'})} AS DATE)) AS INTEGER)
>
>
> VALIDATION ERROR: From line 3, column 55 to line 3, column 66: Column 
> 'SQL_TSI_YEAR' not found in any table
>
> Thanks,
> Sudip
>
>
>
> ***************************Legal Disclaimer***************************
> "This communication may contain confidential and privileged material 
> for the sole use of the intended recipient. Any unauthorized review, 
> use or distribution by others is strictly prohibited. If you have 
> received the message by mistake, please advise the sender by reply 
> email and delete the message. Thank you."
> **********************************************************************



***************************Legal Disclaimer***************************
"This communication may contain confidential and privileged material for the
sole use of the intended recipient. Any unauthorized review, use or distribution
by others is strictly prohibited. If you have received the message by mistake,
please advise the sender by reply email and delete the message. Thank you."
**********************************************************************

Re: TIMESTAMPADD sql jdbc function execution in drill

Posted by Khurram Faraaz <kf...@maprtech.com>.
I didn't find it on the documented date time functions here
https://drill.apache.org/docs/date-time-functions-and-arithmetic/

On Mon, Feb 8, 2016 at 12:09 PM, Sudip Mukherjee <sm...@commvault.com>
wrote:

> Hi,
> Are  TIMESTAMPADD / TIMESTAMPDIFF functions supported through drill? I am
> getting an error while running the below query
>
> SELECT CAST(EXTRACT(YEAR FROM CAST({fn
> TIMESTAMPADD(SQL_TSI_YEAR,CAST(`myshare`.`mtm` AS INTEGER),{d
> '1970-01-01'})} AS DATE)) AS INTEGER) AS
> `yr_Calculation_IGIAGIIHHFEBCCIFEE_ok`
> FROM `dfs.data`.`MyFileShare_2214` `myshare`
> GROUP BY CAST(EXTRACT(YEAR FROM CAST({fn
> TIMESTAMPADD(SQL_TSI_YEAR,CAST(`myshare`.`mtm` AS INTEGER),{d
> '1970-01-01'})} AS DATE)) AS INTEGER)
>
>
> VALIDATION ERROR: From line 3, column 55 to line 3, column 66: Column
> 'SQL_TSI_YEAR' not found in any table
>
> Thanks,
> Sudip
>
>
>
> ***************************Legal Disclaimer***************************
> "This communication may contain confidential and privileged material for
> the
> sole use of the intended recipient. Any unauthorized review, use or
> distribution
> by others is strictly prohibited. If you have received the message by
> mistake,
> please advise the sender by reply email and delete the message. Thank you."
> **********************************************************************