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

Julian Hyde commented on CALCITE-5554:
--------------------------------------

[~tanclary], You're right, {{EXTRACT}} could use a little refactoring. In fact, 
all of the functions that accept {{timeUnit}} as an argument could. But I 
wouldn't stress too much about the {{SQL_TSI_xxx}} aliases; they're only there 
for compliance with the JDBC spec, which very few people use. Also, it's not 
urgent; I think I have found a fix for the LOOKAHEAD warnings (which I will 
merge shortly, in time for Calcite 1.34). So I think you should add it to your 
'moderate tech debt' list and get to it when convenient.

> Add DAYOFWEEK and DAYOFYEAR as valid synonyms of DOW, DOY
> ---------------------------------------------------------
>
>                 Key: CALCITE-5554
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5554
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Tanner Clary
>            Assignee: Tanner Clary
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Currently, a query such as: {{EXTRACT(DAYOFWEEK FROM DATE '2008-12-25');}} is 
> invalid while {{EXTRACT(DOW FROM DATE '2008-12-25')}} is acceptable. BigQuery 
> (and perhaps other dialects) accept the non-abbreviated version as a valid 
> time unit. After this change, DAYOFWEEK and DAYOFYEAR would both be synonyms 
> of DOW and DOY, respectively. 
> [Relevant BigQuery 
> Docs|https://cloud.google.com/bigquery/docs/reference/standard-sql/date_functions#extract]
> Any comments, questions, or suggestions for the linked PR are highly 
> appreciated. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to