[
https://issues.apache.org/jira/browse/PHOENIX-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15600541#comment-15600541
]
Eric Lomore commented on PHOENIX-3355:
--------------------------------------
Thanks for the input, [~maryannxue]
1. Still determining why but when "registerBuiltins()" is in the constructor
this.views gets cleared by the time getFunctions() is called. Obviously I'll
find a better home for it since it's expensive to do it everytime
getFunctions() is called.
2. I went ahead with this but now I'm forced to consider the tradeoffs here, so
wanted to get your input before I proceed. In the case of default values,
phoenix creates an entry for each possible signature, reducing functions by
removing default values. func(arg1, arg2=null) gets mapped to func(arg1) and
func(arg1, arg2). It may be more hassle than its worth to distinguish the
signature that should be registered as a UDF. In the method I have laid out we
avoid this since we're going off the original declaration.
3. Will make this adjustment, thanks!
Unfortunately, I still haven't solved the getDataType() issue I noted. I'm
still looking into how I can get the return type for builtins as it's not
defined in most cases. We could require a new annotation, but that has some
severe backwards compatibility considerations.
> 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
>
>
> 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)