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

Stamatis Zampetakis commented on CALCITE-4410:
----------------------------------------------

I like both ideas outlined by [~julianhyde].

I would also consider the idea of making one implementation of the 
{{SqlValidator}} interface public. Validator is a core component of the 
planning phase and it makes sense to have an implementation that can be easily 
instantiated by the clients; possibly something similar to 
{{RelBuilder#create}}, {{SqlParser#create}}. Currently there is 
{{SqlValidatorUtil#newValidator}} but I think we should have a factory in the 
class itself.

> Expose the type of internal sql node in Planner
> -----------------------------------------------
>
>                 Key: CALCITE-4410
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4410
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.26.0
>            Reporter: Will Yu
>            Assignee: Will Yu
>            Priority: Minor
>
> Currently in Planner interface, there is only possible to fetch the 
> *RelDataType* of the whole SqlNode through *validateAndGetType*, but really 
> hard to fetch the type of one component in the SqlNode, e.g. one of the 
> statement in the select list.
> Currently, we worked it around by duplicate some code in Calcite, which is 
> not a good practice. It would be helpful to directly expose the 
> *SqlValidator::getValidatedNodeType* through Planner.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to