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 2024/09/11 17:48:00 UTC
[jira] [Commented] (CALCITE-6574) Add SqlQueryScopes
[ https://issues.apache.org/jira/browse/CALCITE-6574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17881087#comment-17881087 ]
Julian Hyde commented on CALCITE-6574:
--------------------------------------
Reviewing the PR. Plural class names are a bad idea. How about ScopeMap?
Accessing the getXxxScope functions via another layer of indirection (see below) adds verbosity. Could you make ScopeMap an interface and make validator implement it? The actual scope map would be an immutable object created before the validator, passed into the constructor, stored as a field. The implementation of the (dozen?) methods in validator would be fairly concise.
{noformat}
- final SqlValidatorNamespace namespace = super.getValidator().getNamespace(collationColumn);
+ final SqlValidatorNamespace namespace = super.getValidator().getSqlQueryScopes()
+ .getNamespace(collationColumn);
{noformat}
> Add SqlQueryScopes
> ------------------
>
> 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)