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 <[email protected]> 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:[email protected]] > Sent: 08 February 2016 PM 12:14 > To: [email protected] > 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 <[email protected] > > > 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." > **********************************************************************
