Uh oh!
There was an error while loading. Please reload this page.
Spark: Implement variant extraction pushdown for shredded VARIANT columns - #16715
Spark: Implement variant extraction pushdown for shredded VARIANT columns#16715qlong wants to merge 1 commit into
Conversation
9cb1c91 to
52dcc63Compareqlong
commented
Jun 8, 2026
@rdblue@steveloughran@nssalian PTAL when you get a chance. |
qlong
commented
Jun 18, 2026
Spark side fix for column pruning when variant is pushed down. apache/spark#56556 |
52dcc63 to
fd30c5cCompare…umns - Add SparkVariantExtractionScanBuilder implementing SupportsPushDownVariantExtractions so Spark can push variant_get paths from Filter/Project nodes into Iceberg scans. - Gate behind spark.sql.iceberg.variant-extraction-push-down.enabled (default on). - Use an all-or-nothing batch policy: decline the entire batch if any extraction has an unsupported path, unsupported target type, references a non-variant column, or is a full-variant slot (expectedDataType = VariantType, path $). - Avoid partial scan rewrites that break multi-variant tables and plans where variant_get above join/aggregate barriers still references the original column. - Override readSchema() on batch query scans to expose annotated extraction structs to executors. - Add TestVariantShreddingPushdown for DSv2 plan shape and query correctness. - Requires the parquet-io selective reader PR for end-to-end shredded column reads. issue: apache#16448
fd30c5c to
dd29882CompareSpark side fix to ensure variant pushdown works through aggregate/join/sort: |
steveloughran
commented
Jul 15, 2026
@qlong now that spark 4.2 has shipped, what's the implications for variants in iceberg? |
qlong
commented
Jul 16, 2026
@steveloughran , I did not see performance related fix for variant in Spark 4.2. Pending Spark 4.3 has a few performance fix for variant, including variant filter pushdown (pre-requite for your row group skipping on iceberg side), and extraction pushdown enhancement. In short, file skipping/rowgroup skipping based on filter pushdown won't work until 4.3 is released. Extraction pushdown can work today in simple cases, will automatically get performance enhancement from Spark 4.3. |
qlong
commented
Aug 4, 2026
Spark 4.3 branch was cut, confirmed it contains the extraction pushdown fix (apache/spark#56556) and enhancement (apache/spark#57190), plus the new variant_get in DSv2 expression to support filter pushdown (apache/spark#54394) |
qlong
commented
Aug 20, 2026
ping to prevent auto close |
steveloughran
commented
Aug 21, 2026
we should automate that ping |
Change
This PR is part of the work to support variant extraction pushdown, the core change is to engineschema that now maps slots to paths in variant.
issue: #16448
Notes for reviewers
End to end testing
Requires #16714 for end-to-end testing. To try the full pushdown + selective read path without merging locally, use this branch:
https://github.com/qlong/iceberg/tree/variant-extraction-integration-test
Test Results
See performance improvements in #16714
Co-authored with Claude Sonnet 4.6