[GLUTEN-11550][UT] Enable GlutenParquetVariantShreddingSuite for Spark 4.1#11723
Open
baibaichen wants to merge 1 commit intoapache:mainfrom
Open
[GLUTEN-11550][UT] Enable GlutenParquetVariantShreddingSuite for Spark 4.1#11723baibaichen wants to merge 1 commit intoapache:mainfrom
baibaichen wants to merge 1 commit intoapache:mainfrom
Conversation
…k 4.1 Fallback to vanilla Spark when Parquet files contain variant logical type annotations and spark.sql.parquet.ignoreVariantAnnotation is false (default). Spark 4.1 introduced Parquet variant logical type annotations. When reading a variant-annotated file with a non-variant schema, Spark's ParquetSchemaConverter validates the annotation and throws an error. Velox native reader does not check variant annotations, so the scan must fall back to Spark for correct behavior. Changes: - Add shouldFallbackForParquetVariantAnnotation shim method (SparkShims) - Implement variant annotation detection in Spark41Shims - Add validateVariantAnnotation in ParquetMetadataUtils (not gated by parquetMetadataValidationEnabled since it is a correctness issue) - Enable GlutenParquetVariantShreddingSuite in spark41 VeloxTestSettings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Run Gluten Clickhouse CI on x86 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are proposed in this pull request?
Enable
GlutenParquetVariantShreddingSuitefor Spark 4.1 by adding fallback logic for Parquet variant logical type annotations.Spark 4.1 introduced Parquet variant logical type annotations (
PARQUET_ANNOTATE_VARIANT_LOGICAL_TYPE,PARQUET_IGNORE_VARIANT_ANNOTATION). When reading a variant-annotated Parquet file with a non-variant schema, Spark'sParquetSchemaConvertervalidates the annotation and throws an error. Velox native reader does not check variant annotations, so the scan must fall back to vanilla Spark for correct behavior.Changes:
shouldFallbackForParquetVariantAnnotationshim method inSparkShims(default:false)Spark41Shims: checksPARQUET_IGNORE_VARIANT_ANNOTATIONconfig and recursively scans Parquet schema forVariantLogicalTypeAnnotationvalidateVariantAnnotationinParquetMetadataUtils(not gated byparquetMetadataValidationEnabledsince this is a correctness issue)validateVariantAnnotationfromVeloxBackend.validateMetadata()GlutenParquetVariantShreddingSuitein spark41VeloxTestSettingsHow was this patch tested?
GlutenParquetVariantShreddingSuite: 7/7 passed (including the previously failing"variant logical type annotation - ignore variant annotation")GlutenParquetVariantShreddingSuite: 5/5 passed (no regression)Was this patch authored or co-authored using generative AI tooling?
Generated-by: GitHub Copilot (Claude)
Related issue: #11550