Zoltan Haindrich created HIVE-15271: ---------------------------------------
Summary: Interval support - full sql-2011 compliance Key: HIVE-15271 URL: https://issues.apache.org/jira/browse/HIVE-15271 Project: Hive Issue Type: Improvement Reporter: Zoltan Haindrich This is a follow-up ticket from HIVE-13557 The following interval syntaxes are not yet supported: 1) interval keyword with expression without paraentheneses: {{select date('2011-11-11') + INTERVAL dt SECONDS from table}} 2) the same without the INTERVAL keyword {{select date('2011-11-11') + dt SECONDS from table}} however, using paraentheneses it is supported {{select date('2011-11-11') + INTERVAL (dt) SECONDS from table}} and {{select date('2011-11-11') + (dt) SECONDS from table}} My notes about these: 1) I've bumped into parser troubles implementing it because antlr was not able to create a valid parser; because it "thinked" about usescases like this: {{INTERVAL 1+INTERVAL 1 SECONDS SECONDS}} which is of course invalid...but because andlr have seen an expression inside...it made it loose the track of the SECONDS (I think). 2) is not required to be compliant with the standard - and I it may also lead to confusion: {{1 + dt SECONDS}} is {{1+(1 SECONDS)}} or {{(1+1) SECONDS}} however supporting {{<tableOrColReferences> SECONDS}} might be possible - and "just enough" to be convinient to the user. -- This message was sent by Atlassian JIRA (v6.3.4#6332)