adapter: prep only once in peek/copy_to optimization#35777
Merged
ggevay merged 1 commit intoMaterializeInc:mainfrom Apr 1, 2026
Merged
adapter: prep only once in peek/copy_to optimization#35777ggevay merged 1 commit intoMaterializeInc:mainfrom
ggevay merged 1 commit intoMaterializeInc:mainfrom
Conversation
Prepping in two phases made sense before MaterializeInc#33533 (where phase 1 is with `EvalTime::Deferred`) because meaningful things were happening between the two phases, which were benefitting from phase 1 doing at least partial prepping. But after phase 2 was moved earlier in that PR, now the two phases are very close to each other, and the code between them is not sensitive to phase 1's existence. So, this commit just removes phase 1, and then also removes the now-unused `EvalTime::Deferred`.
Contributor
|
Thanks for opening this PR! Here are a few tips to help make the review process smooth for everyone. PR title guidelines
Pre-merge checklist
|
mgree
approved these changes
Apr 1, 2026
Contributor
mgree
left a comment
There was a problem hiding this comment.
LGTM!
Something I don't understand---likely a problem with my understanding of unmaterializable functions---is why we #33533 only applied to COPY TO and SELECT but not the read-then-write plans for INSERT, UPDATE, or DELETE. But even with that lack of understanding, I agree that we no longer need to do the expr prep twice.
Contributor
Author
Contributor
|
Ah, yes---that makes sense. I saw |
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.
Prepping in two phases made sense before #33533 (where phase 1 is with
EvalTime::Deferred), because meaningful things were happening between the two phases, which were benefitting from phase 1 doing at least partial prepping. But after phase 2 was moved earlier in that PR, now the two phases are very close to each other, and the code between them is not sensitive to phase 1's existence. So, this commit just removes phase 1, and then also removes the now-unusedEvalTime::Deferred.