[
https://issues.apache.org/jira/browse/CALCITE-6574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17881462#comment-17881462
]
James Starr commented on CALCITE-6574:
--------------------------------------
[~julianhyde], I think it best not to overwork the objects such as ScopeMap.
Adding a SqlCluster/ValidationContext object for to encapsulate passing the
state around for these helper methods and containing system large state such as
catalog, type factory and exception factory would clean extract all these
concern from the SqlValidatorImpl while not being to granular. This new class
could be used by the scope populator and the type validator. This would
clearly separate concerns of the data structure being built and accessing the
utility function.
I have not exhaustively explored all the dependencies exhaustively, but you are
correct that agg helper functions do depend on ScopeMap for resolution. So for
my immediate refactor, I would have the SqlValidatorImpl expose the
ScopePopulator and delegate throw their.
> Add ScopeMap
> ------------
>
> Key: CALCITE-6574
> URL: https://issues.apache.org/jira/browse/CALCITE-6574
> Project: Calcite
> Issue Type: Sub-task
> Reporter: James Starr
> Assignee: James Starr
> Priority: Major
> Labels: pull-request-available
>
> See parent description.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)