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 2020/11/05 21:56:00 UTC

[jira] [Comment Edited] (CALCITE-4363) Need a utility to check if a SQL operator is standard

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

Julian Hyde edited comment on CALCITE-4363 at 11/5/20, 9:55 PM:
----------------------------------------------------------------

Regarding annotations in {{SqlStdOperatorTable}}. [~fan_li_ya] and [~danny0405], we've been discussing in the PR, but it's better to discuss here.

The goal is for only standard operators to be in {{SqlStdOperatorTable}}. There would be no way to disable these. Therefore we do not need annotations.

What do we mean by 'standard'? We basically mean standard SQL. But there may be a few operators that we add to Calcite's core operator set, and are always enabled, and those could live in {{SqlStdOperatorTable}} too.

We are some way from that goal. {{SqlStdOperatorTable}} contains 'internal' operators (which have no SQL syntax) and some others. We should identity those operators, move them to another class (often {{class SqlLibraryOperators}}, or perhaps a new {{class SqlInternalOperators}} for internal operators), and mark them deprecated in {{SqlStdOperatorTable}}.

Let's also discuss the difference between "internal" and "special" operators, and make sure that existing operators are correctly categorized.


was (Author: julianhyde):
Regarding annotations in SqlStdOperatorTable.

The goal is for only standard operators to be in SqlStdOperatorTable. There would be no way to disable these. Therefore we do not need annotations.

What do we mean by 'standard'? We basically mean standard SQL. But there may be a few operators that we add to Calcite's core operator set, and are always enabled, and those could live in {{SqlStdOperatorTable}} too.

We are some way from that goal. {{SqlStdOperatorTable}} contains 'internal' operators (which have no SQL syntax) and some others. We should identity those operators, move them to another class (often {{class SqlLibraryOperators}}, or perhaps a new {{class SqlInternalOperators}} for internal operators), and mark them deprecated in {{SqlStdOperatorTable}}.

Let's also discuss the difference between "internal" and "special" operators, and make sure that existing operators are correctly categorized.

> Need a utility to check if a SQL operator is standard
> -----------------------------------------------------
>
>                 Key: CALCITE-4363
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4363
>             Project: Calcite
>          Issue Type: Wish
>          Components: core
>            Reporter: Liya Fan
>            Assignee: Liya Fan
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Currently, all standard SQL operators are defined in SqlStdOperatorTable.java as static members, not as enums. This makes it difficult to check if a SQL function is a standard one. 
> In many scenarios, we need such a check. For example, some optimizations can be performed, if we know the function is standard (not user-defined), because user-defined functions may have some unknown side-effects.
> To support the check, we only need to maintain a set that contains all standard operators. 
> Do you think such a utility should be supported?
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)