-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-53805][SQL] Push Variant into DSv2 scan #52522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM from my side.
cc @peter-toth , too. |
hadoopFsRelation@HadoopFsRelation(_, _, _, _, _: ParquetFileFormat, _), _)) => | ||
rewritePlan(p, projectList, filters, relation, hadoopFsRelation) | ||
case p@PhysicalOperation(projectList, filters, relation: DataSourceV2Relation) => | ||
rewriteV2RelationPlan(p, projectList, filters, relation.output, relation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we are sending the relation already do we need to send the relation.output seperately ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I overlooked this. Removed.
SchemaPruning, | ||
GroupBasedRowLevelOperationScanPlanning, | ||
V1Writes, | ||
PushVariantIntoScan, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now PushVariantIntoScan runs before the PruneFileSourcePartition, which i think was for v1 sources, does this matter or if i were to ask did we just like add in later, just because it was a new rule ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think variant columns will ever be used in the partition schema. Schema transformations by PushVariantIntoScan
shouldn't affect partition pruning in v1 sources.
What changes were proposed in this pull request?
Push Variant into DSv2 scan
Why are the changes needed?
with the change, DSV2 scan only needs to fetch the necessary shredded columns required by the plan
Does this PR introduce any user-facing change?
No
How was this patch tested?
new tests
Was this patch authored or co-authored using generative AI tooling?
No