Skip to content

[SPARK-55617] Add VariantGet to V2ExpressionBuilder for DSv2 filter pushdown#54394

Open
qlong wants to merge 1 commit intoapache:masterfrom
qlong:SPARK-55617-variant-get-v2-expression-builder
Open

[SPARK-55617] Add VariantGet to V2ExpressionBuilder for DSv2 filter pushdown#54394
qlong wants to merge 1 commit intoapache:masterfrom
qlong:SPARK-55617-variant-get-v2-expression-builder

Conversation

@qlong
Copy link

@qlong qlong commented Feb 20, 2026

Add a VariantGet case in V2ExpressionBuilder.generateExpression() so that variant_get and try_variant_get predicates can be translated into V2 UserDefinedScalarFunc and pushed down to connectors via SupportsPushDownV2Filters.

This is to support file-level skipping for shredded variant columns in Iceberg. Only foldable paths and direct table column references for the variant column are supported.

What changes were proposed in this pull request?

Add a VariantGet case in V2ExpressionBuilder.generateExpression() so that variant_get and try_variant_get predicates can be translated into V2 UserDefinedScalarFunc and pushed down to connectors via SupportsPushDownV2Filters.

Jira: https://issues.apache.org/jira/browse/SPARK-55617

Why are the changes needed?

This is to support file-level skipping for shredded variant columns in Iceberg. Only foldable paths and direct table column references for the variant column are supported.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Added unit tests.

Was this patch authored or co-authored using generative AI tooling?

Co-authored with Claude Sonnet.

…ushdown

Add a VariantGet case in V2ExpressionBuilder.generateExpression() so
that variant_get and try_variant_get predicates can be translated into
V2 UserDefinedScalarFunc and pushed down to connectors via
SupportsPushDownV2Filters.

This is to support file-level skipping for shredded variant columns
in Iceberg. Only foldable paths and direct table column references for
the variant column are supported.
qlong added a commit to qlong/iceberg that referenced this pull request Feb 20, 2026
- SparkV2Filters: Convert variant_get/try_variant_get to
  Expressions.extract()
- Spark3Util.describe: Output extract terms as variant_get() for EXPLAIN
- Add tests for both

Depends on Spark PR: apache/spark#54394
@qlong
Copy link
Author

qlong commented Feb 20, 2026

This is the PR on the iceberg side for variant filter pushdown for file skipping. apache/iceberg#15385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments