[
https://issues.apache.org/jira/browse/CALCITE-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17322364#comment-17322364
]
Julian Hyde commented on CALCITE-4580:
--------------------------------------
When you create a new sub-class of {{SqlNode}} there are a lot of aspects of
its behavior that need to be customized. We could have added a hundred
protected methods to {{SqlNode}}, but we didn't. Instead we require that you
create a {{SqlOperator}} instance (possibly a new class, possibly not) and bind
it to a sub-class of {{SqlNode}}, namely {{SqlCall}}, that knows how to
delegate behavior to {{SqlOperator}}.
That is why everything extends {{SqlCall}}.
> Change the visibility for SqlNode constructor
> ---------------------------------------------
>
> Key: CALCITE-4580
> URL: https://issues.apache.org/jira/browse/CALCITE-4580
> Project: Calcite
> Issue Type: Task
> Reporter: Konstantin Orlov
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently the constructor is package private. That forces developers
> extending the parser to put all custom nodes under {{org.apache.calcite.sql}}
> package (or at least create one abstract node {{MySqlNode}} extending
> {{SqlNode}} and exposing the constructor). It would nice to have the
> constructor exposed by {{SqlNode}} itself.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)