Repository navigation
Fix parquet getitem optimization - #7106
Merged
Merged
Conversation
Member
|
Thanks! I believe the CI failure is unrelated. |
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.
Addresses column-selection component of #7090
It seems that #5917 added a change to
optimize_read_parquet_getitemthat bails on the parquet optimization whenever agetitemtask is in the list of requested keys. This means that the optimization is skipped when the column selection is the last thing the user does before computing/persisting. I may be misunderstanding, but I don't think this change makes sense.The original problem in #5893 was that the
read-parquettask was in the list of requested keys (not that thegetitemtask was included). As far as I can tell, we just need to check that theread-parquettasks are not in the list of requested keys, otherwise we cannot change the name of that layer during the optimization.This PR changes the
optimize_read_parquet_getitemlogic to bail if the requested keys include any keys from theread-parquetlayer. This is the "conservative" approach, since it is probably fine to continue with the optimization if we preserve the original name. Note that I may be misunderstanding the reason for the original logic, so please do let me know if this makes sense (cc @TomAugspurger).