[
https://issues.apache.org/jira/browse/CALCITE-7012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alessandro Solimando updated CALCITE-7012:
------------------------------------------
Description:
As CALCITE-6978 describes, unconditional call rewrites in the validator can be
wrong, especially for calls "duplicating" their arguments, like COALESCE and
NULLIF (possibly others).
Calls not exhibiting this behavior could still be translated at the SqlNode
level, while the others should be covered by an optimization rule applying the
rewrites after validation, at the RexNode level.
Ideally, this rule should be part of the standard ruleset, to ease adoption.
A detailed listing of the current rewrite steps for calls is available in [this
comment|https://issues.apache.org/jira/browse/CALCITE-7035?focusedCommentId=17953511&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17953511].
was:
As CALCITE-6978 describes, unconditional call rewrites in the validator can be
wrong.
There should be an optimization pass which performs these rewrites after
validation.
> Create an optimization pass which performs the task of callRewrite of the
> validator
> -----------------------------------------------------------------------------------
>
> Key: CALCITE-7012
> URL: https://issues.apache.org/jira/browse/CALCITE-7012
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.39.0
> Reporter: Mihai Budiu
> Priority: Minor
>
> As CALCITE-6978 describes, unconditional call rewrites in the validator can
> be wrong, especially for calls "duplicating" their arguments, like COALESCE
> and NULLIF (possibly others).
> Calls not exhibiting this behavior could still be translated at the SqlNode
> level, while the others should be covered by an optimization rule applying
> the rewrites after validation, at the RexNode level.
> Ideally, this rule should be part of the standard ruleset, to ease adoption.
> A detailed listing of the current rewrite steps for calls is available in
> [this
> comment|https://issues.apache.org/jira/browse/CALCITE-7035?focusedCommentId=17953511&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17953511].
--
This message was sent by Atlassian Jira
(v8.20.10#820010)