[
https://issues.apache.org/jira/browse/CALCITE-3974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17101199#comment-17101199
]
Julian Hyde commented on CALCITE-3974:
--------------------------------------
For data fields the style tends to be to make the fields public and final
rather than add accessor methods.
Rationale: people don't tend to document accessor methods very well; over time
the SqlNode AST classes are becoming mostly immutable, so don't need 'set'
methods. There are a few 'virtual' accessors, for example
{{SqlCall.getOperator()}}, but they are exceptions.
> Add some accessors for Calcite AST nodes private data fields
> ------------------------------------------------------------
>
> Key: CALCITE-3974
> URL: https://issues.apache.org/jira/browse/CALCITE-3974
> Project: Calcite
> Issue Type: Improvement
> Reporter: Drew Schmitt
> Priority: Minor
>
> There are a few private fields in Calcite's AST nodes that would be easier to
> access with an explicit getter, rather than using the getOperandList() method.
> For example, SqlCreateFunction's name field is private, but can already be
> access through getOperandList().get(0). We should add an explicit getName()
> getter.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)