Skip to content

[GLUTEN-11550][VL][UT] Enable Variant test suites#11726

Open
baibaichen wants to merge 1 commit intoapache:mainfrom
baibaichen:fix/GlutenVariantEndToEndSuite-GlutenVariantShreddingSuite
Open

[GLUTEN-11550][VL][UT] Enable Variant test suites#11726
baibaichen wants to merge 1 commit intoapache:mainfrom
baibaichen:fix/GlutenVariantEndToEndSuite-GlutenVariantShreddingSuite

Conversation

@baibaichen
Copy link
Contributor

@baibaichen baibaichen commented Mar 9, 2026

What changes are proposed in this pull request?

Enable GlutenVariantEndToEndSuite, GlutenVariantShreddingSuite, and GlutenParquetVariantShreddingSuite for both spark40 and spark41.

Three fallback fixes:

  1. VeloxValidatorApi.scala: Detect variant shredded structs (produced by Spark's PushVariantIntoScan) by checking for __VARIANT_METADATA_KEY metadata on struct fields. Triggers fallback to Spark's native Parquet reader since Velox cannot read variant shredding encoding.

  2. VeloxSparkPlanExecApi.scala + ExpressionRestrictions.scala: Reject to_json with non-struct/map/array child types (e.g. VariantType), falling back to Spark since Velox does not support VariantType in to_json.

  3. Spark41Shims.scala + ParquetMetadataUtils.scala + VeloxBackend.scala: Detect Parquet variant logical type annotations and fall back to vanilla Spark when PARQUET_IGNORE_VARIANT_ANNOTATION is not set, since Velox native reader does not check variant annotations.

How was this patch tested?

  • spark40: GlutenVariantEndToEndSuite 14✅, GlutenVariantShreddingSuite 8✅, GlutenParquetVariantShreddingSuite 5✅
  • spark41: GlutenVariantEndToEndSuite 14✅, GlutenVariantShreddingSuite 8✅, GlutenParquetVariantShreddingSuite 7✅

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

Generated-by: GitHub Copilot CLI

Related issue: #11550

Note: This PR subsumes #11723 (GlutenParquetVariantShreddingSuite).

@github-actions github-actions bot added CORE works for Gluten Core VELOX labels Mar 9, 2026
@baibaichen baibaichen force-pushed the fix/GlutenVariantEndToEndSuite-GlutenVariantShreddingSuite branch 2 times, most recently from 8f1d876 to 4a21089 Compare March 11, 2026 04:26
Enable GlutenVariantEndToEndSuite, GlutenVariantShreddingSuite, and
GlutenParquetVariantShreddingSuite for both spark40 and spark41.

Fixes:
1. VeloxValidatorApi: Detect variant shredded structs (produced by
   Spark's PushVariantIntoScan) by checking __VARIANT_METADATA_KEY
   metadata. Triggers fallback to Spark's native Parquet reader.

2. VeloxSparkPlanExecApi: Reject to_json with non-struct/map/array
   child types (e.g. VariantType), falling back to Spark since Velox
   does not support VariantType in to_json.

3. Spark41Shims: Detect Parquet variant logical type annotations and
   fall back to vanilla Spark when PARQUET_IGNORE_VARIANT_ANNOTATION
   is not set, since Velox native reader does not check variant
   annotations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@baibaichen baibaichen force-pushed the fix/GlutenVariantEndToEndSuite-GlutenVariantShreddingSuite branch from 4a21089 to 794a1fe Compare March 11, 2026 05:13
@baibaichen baibaichen changed the title [GLUTEN-11550][VL][UT] Enable GlutenVariantEndToEndSuite and GlutenVariantShreddingSuite [GLUTEN-11550][VL][UT] Enable Variant test suites Mar 11, 2026
@github-actions
Copy link

Run Gluten Clickhouse CI on x86

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

Labels

CORE works for Gluten Core VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant