drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Khurram Faraaz <kfar...@maprtech.com>
Subject Re: TIMESTAMPADD sql jdbc function execution in drill
Date Mon, 08 Feb 2016 06:43:49 GMT
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."
> **********************************************************************

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message