[ 
https://issues.apache.org/jira/browse/PHOENIX-3440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15671064#comment-15671064
 ] 

Julian Hyde edited comment on PHOENIX-3440 at 11/16/16 5:37 PM:
----------------------------------------------------------------

We have CALCITE-304 logged, but not progress in a long time. The fix would be 
to convert numerics to day intervals, if allowed by the conformance. So it's 
basically syntactic sugar.

I presume list of signatures is the following, substituting a numeric anywhere 
that you currently use an interval:
* numeric + date
* numeric + timestamp
* date + numeric
* timestamp + numeric
* date - numeric
* timestamp - numeric

But not say numeric - date, or date * numeric, or date / numeric, or date * 
numeric, or anything involving time.

Can someone please add the definitive list to CALCITE-304?


was (Author: julianhyde):
We have CALCITE-304 logged, but not progress in a long time. The fix would be 
to convert numerics to day intervals, if allowed by the conformance. So it's 
basically syntactic sugar.

I presume list of signatures is the following, substituting a numeric anywhere 
that you currently use an interval:
* numeric + date
* numeric + timestamp
* date + numeric
* timestamp + numeric
* date - numeric
* timestamp - numeric

But not say numeric - date, or time + numeric.

Can someone please add a full to CALCITE-304?

> Calcite has specific requirements for date and datetime operations
> ------------------------------------------------------------------
>
>                 Key: PHOENIX-3440
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3440
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Eric Lomore
>            Priority: Minor
>
> This popped up just today in the Calcite mailing list, and I noticed numerous 
> failures in phoenix test cases.
> Just a few of many:
> testDateSubtractExpressionMetaData1
> testDateSubtractExpressionMetaData2
> testDateSubtractExpressionMetaData3
> testDateAdditionExpressionMetaData1
> testDateAdditionExpressionMetaData2
> testTwoDateSubtractExpressionMetaData
> These tests fail due to the difference in support.
> Summary of acceptable operations from the various exception codes:
> {code}
> Supported form(s): 
> '<NUMERIC> - <NUMERIC>'
> '<NUMERIC> + <NUMERIC>'
> '<DATETIME_INTERVAL> - <DATETIME_INTERVAL>'
> '<DATETIME_INTERVAL> + <DATETIME_INTERVAL>'
> '<DATETIME> - <DATETIME_INTERVAL>'
> '<DATETIME> + <DATETIME_INTERVAL>'
> {code}
> Some of the incompatibilities thrown:
> {code}
> '<NULL> - <DATE>'
> '<NULL> + <DATE>'
> <INTEGER> + <DATE>
> <DATE> - <DECIMAL(2, 1)>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to