[
https://issues.apache.org/jira/browse/OPTIQ-304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14039713#comment-14039713
]
Vladimir Sitnikov commented on OPTIQ-304:
-----------------------------------------
I've logged OPTIQ-308 for invalid date+interval calculation.
{quote}Extract doesn't do the job{quote}
I do not follow you.
The exact SO thread suggest using {{EXTRACT}} to figure out the number of
seconds.
Single {{EXTRACT}} is not sufficient, but there is no reliable way to convert
interval to the number of seconds without {{EXTRACT}}.
{{sysdate + (interval_difference * 86400) - sysdate}} trick fails when the
interval becomes long enough (I did run into this issue)
> Support '<DATE> + <INTEGER>' operator
> -------------------------------------
>
> Key: OPTIQ-304
> URL: https://issues.apache.org/jira/browse/OPTIQ-304
> Project: optiq
> Issue Type: Bug
> Reporter: Julian Hyde
>
> We should support '<DATE> + <INTEGER>' operator. I'm not sure whether it is
> standard SQL, but it occurs in TPC-DS (query 72).
> Note that {{d + n}} is equivalent to {{d + interval n day}} if {{n}} is a
> constant.
--
This message was sent by Atlassian JIRA
(v6.2#6252)