[ https://issues.apache.org/jira/browse/CALCITE-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17209830#comment-17209830 ]
Julian Hyde edited comment on CALCITE-4297 at 10/7/20, 8:14 PM: ---------------------------------------------------------------- This is duplicate of CALCITE-1766, which added {{SqlConformance.allowNiladicParentheses()}}. Maybe the value needs to be changed for {{SqlConformanceEnum.BIG_QUERY}}. Maybe the value should be changed from boolean to Optionality (mandatory, optional, ignored, forbidden). Lastly, we do not have the CURRENT_DATETIME function. We should add it as BigQuery-specific. was (Author: julianhyde): This is duplicate of CALCITE-1766, which added {{SqlConformance.allowNiladicParentheses()}}. Maybe the value needs to be changed for {{SqlConformanceEnum.BIG_QUERY}}. Maybe the value should be changed from boolean to Optionality (mandatory, optional, ignored, forbidden). > Babel should accept CURRENT_DATE and CURRENT_DATETIME, with and without > parentheses > ----------------------------------------------------------------------------------- > > Key: CALCITE-4297 > URL: https://issues.apache.org/jira/browse/CALCITE-4297 > Project: Calcite > Issue Type: Bug > Components: babel > Affects Versions: 1.25.0 > Reporter: Justin Swett > Priority: Major > > The following BigQuery SQL contains CURRENT_DATE and CURRENT_DATETIME without > parentheses. Babel parser should accept it. (It should also accept > CURRENT_TIME and CURRENT_TIMESTAMP with parentheses.) > > The following SQL should trigger *CalciteContextException: No match found for > function signature CURRENT_TIMESTAMP()* for the date functions, or if you add > parens to the current_time. > > {code:java} > WITH THE_TIMES_ARE_STATIC AS > (SELECT > CURRENT_DATE as a_date, > CURRENT_DATETIME() as a_datetime, > CURRENT_TIME as a_time, > CURRENT_TIMESTAMP() as a_timestamp > ) > SELECT * FROM THE_TIMES_ARE_STATIC > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)