[
https://issues.apache.org/jira/browse/CALCITE-7012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alessandro Solimando updated CALCITE-7012:
------------------------------------------
Summary: Implement the callRewrite of the validator as an optimization rule
for calls duplicating their arguments like COALESCE and NULLIF (was: Create an
optimization pass which performs the task of callRewrite of the validator)
> Implement the callRewrite of the validator as an optimization rule for calls
> duplicating their arguments like COALESCE and NULLIF
> ---------------------------------------------------------------------------------------------------------------------------------
>
> 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: Major
>
> 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)