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

Stuti Gupta commented on CALCITE-2846:
--------------------------------------

There are certain operators which are present in multiple dialects but are not 
part of SqlStdOperatorTable. So to avoid duplicating these operators in 
multiple dialect specific OperatorTables, I propose that,

Creating a CommonSqlOperatorTable, which will have functions/operators that are 
common in more than one dialect. 
In the CommonSqlOperatorTable, the functions will have an annotation which will 
take the list of dialects to which it belongs.

Also, there will be a wrapper SqlOperatorTable that will take the 
CommonSqlOperatorTable and an accompanying dialect, and all lookups via the 
ChainedSqlOperatorTable will go via this wrapper/delegator. This class will 
simply filter out those operators that do not equal the dialect with which it 
has been initialized.

I would like to know your views on this approach.

> Document Oracle-specific functions, such as NVL and LTRIM, in the SQL 
> reference
> -------------------------------------------------------------------------------
>
>                 Key: CALCITE-2846
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2846
>             Project: Calcite
>          Issue Type: Improvement
>          Components: site
>            Reporter: Julian Hyde
>            Assignee: Hongze Zhang
>            Priority: Major
>              Labels: documentation
>
> Document Oracle-specific functions (DECODE, NVL, LTRIM, RTRIM, SUBSTR, 
> GREATEST, LEAST) in the [SQL 
> reference|https://calcite.apache.org/docs/reference.html].
> Same goes for MySQL-specific functions (e.g. JSON_TYPE).
> I don't think we should have separate lists of Oracle-specific functions and 
> MySQL-specific functions. Because quite a few functions appear in more than 
> one place. Better, I think, to have a concise annotation against each 
> function which tables it occurs in.
> The current list of tables is standard, oracle, spatial, mysql. Perhaps also 
> indicate whether a function is an extension to the SQL standard but still 
> occurs in Calcite's default table.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to