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

Julian Hyde commented on CALCITE-1793:
--------------------------------------

[~chris-baynes], Let's continue discussion in this JIRA case. Hopefully you saw 
my design hints on the mail thread. They're only hints, and I can't say with 
absolute certainty that I am not sending you down the wrong path. So, if it's 
not making sense please holler.

> Allow RelBuilder to make calls to EXTRACT
> -----------------------------------------
>
>                 Key: CALCITE-1793
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1793
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.11.0, 1.12.0
>            Reporter: Chris Baynes
>            Assignee: Julian Hyde
>            Priority: Minor
>
> EXTRACT_DATE was originally intended to be an internal function, always 
> created by translating a call to EXTRACT.
> Currently this makes the EXTRACT_DATE function rather awkward to use:
> {code}
> SqlOperator op = new SqlSpecialOperator("EXTRACT_DATE", SqlKind.EXTRACT, 2, 
> true, ReturnTypes.INTEGER, null, null);
> builder.call(op, builder.getRexBuilder().makeFlag(TimeUnitRange.YEAR), 
> builder.field(1, 0, "my_date"));
> {code}
> [~julianhyde] suggests calling EXTRACT directly and then have RelBuilder 
> invoke a convertlet to translate into calls to EXTRACT_DATE or date-time 
> arithmetic.
> Mailing list discussion:
> [http://mail-archives.apache.org/mod_mbox/calcite-dev/201705.mbox/%3CCAPSgeET9OVWkvGsGXAezqhqP3Zd2dmXxs0k-J92WZM32%2BMq3kw%40mail.gmail.com%3E]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to