You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/01/06 12:05:39 UTC
[jira] [Commented] (CALCITE-1043) RexOptUtil does not support
function table other than SqlStdOperatorTable
[ https://issues.apache.org/jira/browse/CALCITE-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15085410#comment-15085410 ]
Julian Hyde commented on CALCITE-1043:
--------------------------------------
[~tedxu], I'm interested about your use case of using a different operator table. Are you intending to add some additional operators over and above the standard ones? For this, ChainedSqlOperatorTable is useful. You would still have the SqlStdOperatorTable underneath, so it would be the same instance of, say, the EQUALS operator.
But if your use case is different, tell us what it is, let's figure out an official way to support it.
Your patch looks basically good. And by the way, I just fixed CALCITE-1039, which provides SqlKind values for several more built-in operators. (It will be merged to master in the next day or two, but for now you can see it at https://github.com/julianhyde/calcite/commit/904c73da60b9f9deec61ea34d89ada3462381f93.)
Have you found and fixed all places where we compare operators by identity, or just the ones that were causing you trouble?
It would be really useful if your patch contained a test case. You could add a test to FrameworksTest that creates an operator table similar to the one in your project then calls {code}FrameworkConfig config = Frameworks.newConfigBuilder().operatorTable(myTable).build();{code} so that it gets used during parsing/validation/planning.
I'll accept the patch when it has a test case and when you're fairly sure you've replaced all the operator identity comparisons you need.
> RexOptUtil does not support function table other than SqlStdOperatorTable
> -------------------------------------------------------------------------
>
> Key: CALCITE-1043
> URL: https://issues.apache.org/jira/browse/CALCITE-1043
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.6.0
> Reporter: Ted Xu
> Assignee: Julian Hyde
> Priority: Critical
> Fix For: 1.6.0
>
> Attachments: calcite-1043.patch
>
>
> RexOptUtil currently doesn't support function table other than SqlStdOperatorTable, which prevents third-party function implementations to reuse RexOptUtil.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)