You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-50615][FOLLOWUP][SQL] Avoid dropping metadata in the push rule
### What changes were proposed in this pull request?
There is a bug in the optimizer rule that the `output` of the relation will be rebuilt based on the schema of the `HadoopFsRelation`. This schema doesn't include file metadata (the `_metadata` column). This PR fixes the bug. The new implementation no longer requires `hadoopFsRelation.schema` and `relation.output` to have the same order, which I don't think is guaranteed.
### Why are the changes needed?
It is a necessary bug fix.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Unit test. It would fail without the fix.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closesapache#50121 from chenhao-db/fix_variant_pushdown_metadata.
Authored-by: Chenhao Li <chenhao.li@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
0 commit comments