sashidhar opened a new issue #8179: Druid SQL CEIL time function should support 
all the time units it shows in error messages
URL: https://github.com/apache/incubator-druid/issues/8179
 
 
   ### Affected Version
   
   Druid version 0.15.0 (and probably all other previous versions)
   
   ### Description
   
   Run the below query
   
   `SELECT CEIL(CURRENT_TIMESTAMP TO XYZ)  from  wikipedia LIMIT 1;`
   
   Following is the error message:
   
   `Unknown exception / Encountered "TO XYZ" at line 1, column 46. Was 
expecting one of: ")" ... "NOT" ... "IN" ... "<" ... "<=" ... ">" ... ">=" ... 
"=" ... "<>" ... "!=" ... "BETWEEN" ... "LIKE" ... "SIMILAR" ... "+" ... "-" 
... "*" ... "/" ... "%" ... "||" ... "AND" ... "OR" ... "IS" ... "MEMBER" ... 
"SUBMULTISET" ... "CONTAINS" ... "OVERLAPS" ... "EQUALS" ... "PRECEDES" ... 
"SUCCEEDS" ... "IMMEDIATELY" ... "MULTISET" ... "[" ... "(" ... "TO" 
"MICROSECOND" ... "TO" "MILLISECOND" ... "TO" "SECOND" ... "TO" "MINUTE" ... 
"TO" "HOUR" ... "TO" "DAY" ... "TO" "DOW" ... "TO" "DOY" ... "TO" "ISODOW" ... 
"TO" "ISOYEAR" ... "TO" "WEEK" ... "TO" "MONTH" ... "TO" "QUARTER" ... "TO" 
"YEAR" ... "TO" "EPOCH" ... "TO" "DECADE" ... "TO" "CENTURY" ... "TO" 
"MILLENNIUM" ... / org.apache.calcite.sql.parser.SqlParseException`
   
   CEIL function doesn't support these time units - MICROSECOND, MILLISECOND, 
DOW, DOY, ISODOW, ISOYEAR, EPOCH, DECADE, CENTURY and MILLENNIUM
   
   For example,
   
   `SELECT CEIL(CURRENT_TIMESTAMP TO MICROSECOND)  from  wikipedia LIMIT 1;`
   
   returns 
   
   Unknown exception / Cannot build plan for query: SELECT * FROM (SELECT 
CEIL(CURRENT_TIMESTAMP TO MICROSECOND) from wikipedia LIMIT 1) LIMIT 5000 / 
org.apache.druid.java.util.common.ISE
   
   `SELECT CEIL(CURRENT_TIMESTAMP TO ISODOW)  from  wikipedia LIMIT 1;`
   
   returns
   
   `Unknown exception / ISODOW / 
org.apache.calcite.sql.parser.SqlParseException`
   
   Found this while playing around with CEIL function on the lines of 
https://github.com/apache/incubator-druid/issues/7935. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to