[BugFix] remain unsupported operator when dict mapping rewrite (backport #42230) #42271
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an automatic backport of pull request #42230 done by Mergify.
Cherry-pick of b36f084 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refresh
will re-evaluate the rules@Mergifyio rebase
will rebase this PR on its base branch@Mergifyio update
will merge the base branch into this PR@Mergifyio backport <destination>
will backport this PR on<destination>
branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com
What I'm doing:
For sql:
When rewriting the nested function,
S_ADDRESS = 'a'
can apply dict withhasApplied = true
,SUBSTR(MD5(S_ADDRESS), 1, 8)
has unsupported func and its rewrite result isSUBSTR(MD5(dict_mapping(S_ADDRESS)), 1, 8)
withhasApplied = false
anddisableApplied = false
.For the if function, the rewrite context is
hasApplied = true
anddisableApplied = false
, it choose the wrong rewrite branch.We need to propagate the
hasUnsupportedOperator
to the outer to ensure the scalarOperator with hasApplied child and has unsuppored child to do dict mapping process again.Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist: