[CALCITE-5390] RelDecorrelator throws NullPointerException#4627
Draft
dssysolyatin wants to merge 2 commits intoapache:mainfrom
Draft
[CALCITE-5390] RelDecorrelator throws NullPointerException#4627dssysolyatin wants to merge 2 commits intoapache:mainfrom
dssysolyatin wants to merge 2 commits intoapache:mainfrom
Conversation
|
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@calcite.apache.org list. Thank you for your contributions. |
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.
Ticket: [CALCITE-5390]
I will have time to continue this work only next month. If anyone wishes to take over or continue this task in the meantime, please feel free to do so. I currently have a draft solution, but it has a few problems that need resolving:
NullPointerExceptionin cases where a correlation variable is used but has not been properly introduced. This specifically happens in join plans where a subquery exists in the ON clause, but not in the WHERE clause. (See example: [CALCITE-7286]). Also in this case of [CALCITE-7286]LogicalJoinshould be replaced byLogicalCorrelateRelNode.copymethod with a 3rd parameter to replace the variablesSet [CALCITE-7280]. As suggested by Stamatis in a comment on this task, this functionality should probably be implemented using theRelBuilderinstead.buildKeepingLast.PR contains two commits. The first commit relates to [CALCITE-7280] (introducing copy method) and second contains the logic for the main fix itself. Feel free to add any comment you wish, especially if you know a better solution.