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

Zoltan Haindrich commented on HIVE-13557:
-----------------------------------------

i've posted the first version.

instead of trying to force the existing interval evaluation logic to do these 
too...i've added an interval evalution logic inside an udf; i think it would be 
good to use the same thing to evaluate the old {{intervalLiteral}}'s outputs - 
however that would need intervalLiteral to be removed from the 'constant' 
group...I think the only feature which would be missing after that: is the 
ability to specify skewed columns by intervalLiterals...

using an udf enables that the interval argument can be possibly a column 
reference also - if I interpretted the sql2011 correctly: that's desired by the 
standard.

note: currently the parentheses are mandatory..but in case we merge 
{{intervalExpression}} with {{intervalLiteral}}...it wont be needed anymore - I 
haven't found any references about these parentheses to be mandatory - its a 
large document...I lose my mind every time I open it ;)

> Make interval keyword optional while specifying DAY in interval arithmetic
> --------------------------------------------------------------------------
>
>                 Key: HIVE-13557
>                 URL: https://issues.apache.org/jira/browse/HIVE-13557
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Types
>            Reporter: Ashutosh Chauhan
>            Assignee: Zoltan Haindrich
>         Attachments: HIVE-13557.1.patch
>
>
> Currently we support expressions like: {code}
> WHERE SOLD_DATE BETWEEN ((DATE('2000-01-31'))  - INTERVAL '30' DAY) AND 
> DATE('2000-01-31')
> {code}
> We should support:
> {code}
> WHERE SOLD_DATE BETWEEN ((DATE('2000-01-31')) + (-30) DAY) AND 
> DATE('2000-01-31')
> {code}
>   



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

Reply via email to