You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "tanclary (via GitHub)" <gi...@apache.org> on 2023/04/24 15:55:38 UTC

[GitHub] [calcite] tanclary commented on a diff in pull request #3125: [CALCITE-5449] Allow EXTRACT() to accept DAYOFWEEK, DAYOFYEAR, ISOWEEK, WEEK(WEEKDAY)

tanclary commented on code in PR #3125:
URL: https://github.com/apache/calcite/pull/3125#discussion_r1175492762


##########
core/src/main/codegen/templates/Parser.jj:
##########
@@ -5127,8 +5127,6 @@ SqlIntervalQualifier TimeUnit() : {
 |   <MINUTE> { return new SqlIntervalQualifier(TimeUnit.MINUTE, null, getPos()); }
 |   <HOUR> { return new SqlIntervalQualifier(TimeUnit.HOUR, null, getPos()); }
 |   <DAY> { return new SqlIntervalQualifier(TimeUnit.DAY, null, getPos()); }
-|   <DAYOFWEEK> { return new SqlIntervalQualifier(TimeUnit.DOW, null, getPos()); }

Review Comment:
   DAYOFWEEK is a valid time unit for BigQuery. However here (which I added this in a previous commit), it translates it to DOW which is not a valid time unit for BigQuery. Instead, I wanted to treat it as a timeframe that is an alias to DOW (and DOY, respectively). 



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org