phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maryann Xue (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3355) Register Phoenix built-in functions as Calcite functions
Date Thu, 03 Nov 2016 22:05:58 GMT

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

Maryann Xue commented on PHOENIX-3355:
--------------------------------------

I like the idea of "context-sensitive" default value. And Calcite doesn't really handle default
values. All it asks is if the argument is optional, which is if it can have a default value.
Calcite has a placeholder expression "DEFAULT()" to indicate default value, and it leaves
everything to the adapter (in our case, Phoenix) for getting the default value.
So I think to do this, we need an abstraction level for FunctionArgument. We'll change the
FunctionArgument class into an interface which has a method "getDefaultValue(StatementContext
context)", and then have a default implementation class FunctionArgumentImpl which is essentially
the existing FunctionArgument logic. Thus for functions like ToDateFunction, in its function
info, we'll have specific implementation of FunctionArgument for the last two arguments. How
does that sound, [~jamestaylor]?

> Register Phoenix built-in functions as Calcite functions
> --------------------------------------------------------
>
>                 Key: PHOENIX-3355
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3355
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: Eric Lomore
>              Labels: calcite
>         Attachments: PHOENIX-3355.wip, PHOENIX-3355.wip2
>
>
> We should register all Phoenix built-in functions that don't exist in Calcite.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message