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/03/17 01:48:00 UTC
[jira] [Commented] (CALCITE-6327) getValidatedNodeTypeIfKnown should never throw
[ https://issues.apache.org/jira/browse/CALCITE-6327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17827759#comment-17827759 ]
Julian Hyde commented on CALCITE-6327:
--------------------------------------
That sounds right. However, mutations of the AST make me nervous. I know we mutate the AST for a few reasons (e.g. expanding '*') but if you are doing an unsanctioned mutation then the blame is on you, not Calcite.
(Since Calcite was originally written, I have become more of a pure functional programmer and I wish we should remove all mutations.)
> getValidatedNodeTypeIfKnown should never throw
> ----------------------------------------------
>
> Key: CALCITE-6327
> URL: https://issues.apache.org/jira/browse/CALCITE-6327
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.36.0
> Reporter: Claude Brisson
> Priority: Major
>
> During validation, when a SqlNode has been rewritten (for instance when a COALESCE call has been rewritten as a CASE call) but does not yet have a RelDataType, the method SqlValidatorImpl.getValidatedNodeTypeIfKnown() throws an exception because it relies on SqlValidatorImpl.getValidatedNodeType(originalExpr), not on SqlValidatorImpl.getValidatedNodeTypeIfKnown(originalExpr).
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)