[CALCITE-3848] Materialized view rewriting fails for mv consisting of group by on join keys (Vineet Garg) - #1852
Closed
vineetgarg02 wants to merge 1 commit into
Closed
[CALCITE-3848] Materialized view rewriting fails for mv consisting of group by on join keys (Vineet Garg)#1852vineetgarg02 wants to merge 1 commit into
vineetgarg02 wants to merge 1 commit into
Conversation
jcamachor
reviewed
Mar 10, 2020
jcamachor
left a comment
Contributor
There was a problem hiding this comment.
Can we also run materialized views tests in Hive with this change? Due to complex plans and different interaction with other rules, those tests may catch issues that existing tests in Calcite do not.
| if (rewritingMapping != null) { | ||
| pos = rewritingMapping.getTargetOpt(pos); | ||
| pos = rewritingMapping.get(pos).iterator().next(); | ||
| if (pos == -1) { |
Contributor
There was a problem hiding this comment.
This could be -1 when we called getTargetOpt. However, can this be -1 now? Should we check for empty instead of == -1? Same for follow-up calls.
Contributor
Author
There was a problem hiding this comment.
Yup good catch.
… group by on join keys (Vineet Garg)
vineetgarg02
force-pushed
the
CALCITE-3848
branch
from
March 10, 2020 17:02
fd84152 to
43b8b95
Compare
jamesstarr
pushed a commit
to jamesstarr/calcite
that referenced
this pull request
Mar 16, 2026
… on join keys fails with Mappings$NoElementException (Vineet Garg) Close apache#1852
jamesstarr
pushed a commit
to jamesstarr/calcite
that referenced
this pull request
Mar 16, 2026
… on join keys fails with Mappings$NoElementException (Vineet Garg) Close apache#1852
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 request fixes an issue in materialize view rewriting mapping logic