vectorijk opened a new pull request, #13506:
URL: https://github.com/apache/gluten/pull/13506
…ve Hive Parquet writer
With spark.sql.hive.convertMetastoreParquet=false, Spark writes through
HiveFileFormat and resolves the Parquet codec from the Hive table properties
(HiveOptions.getHiveWriteCompression), storing it in the job Hadoop conf.
WriteFilesExecTransformer instead derived the codec from the WriteFilesExec
options map, which for Hive writes only carries the bucket-write flag, so the
native writer fell back to spark.sql.parquet.compression.codec and ignored
TBLPROPERTIES ('parquet.compression'='zstd').
Add HiveFileFormatUtil to reach the Hive TableDesc through HiveFileFormat
and merge its table properties into WriteFilesExecTransformer's
caseInsensitiveOptions, under the explicit options. This makes both codec
validation and the native writer configuration see the table property with the
same precedence as vanilla Spark. VeloxTransformerApi builds its Hadoop conf
from the merged options, and the Velox and Bolt backends reuse the helper for
their existing output-format reflection.
Re-enable the ignored Velox test case and turn the Bolt suite's discarded
Boolean comparison into an assert.
Fixes #12987
<!--
Thank you for submitting a pull request! Here are some tips:
1. For first-time contributors, please read our contributing guide:
https://github.com/apache/gluten/blob/main/CONTRIBUTING.md
2. If necessary, create a GitHub issue for discussion beforehand to avoid
duplicate work.
3. If the PR is specific to a single backend, include [VL] or [CH] in the PR
title to indicate the
Velox or ClickHouse backend, respectively.
4. If the PR is not ready for review, please mark it as a draft.
-->
## What changes are proposed in this pull request?
<!--
Provide a clear and concise description of the changes introduced in this PR.
Ensure the PR description aligns with the code changes, especially after
updates.
If applicable, include "Fixes #<GitHub_Issue_ID>" to automatically close the
corresponding issue
when the PR is merged.
-->
Respect parquet.compression table property in native Hive Parquet writer
With spark.sql.hive.convertMetastoreParquet=false, Spark writes through
HiveFileFormat and resolves the Parquet codec from the Hive table properties
(HiveOptions.getHiveWriteCompression), storing it in the job Hadoop conf.
WriteFilesExecTransformer instead derived the codec from the WriteFilesExec
options map, which for Hive writes only carries the bucket-write flag, so the
native writer fell back to spark.sql.parquet.compression.codec and ignored
TBLPROPERTIES ('parquet.compression'='zstd').
Add HiveFileFormatUtil to reach the Hive TableDesc through HiveFileFormat
and merge its table properties into WriteFilesExecTransformer's
caseInsensitiveOptions, under the explicit options. This makes both codec
validation and the native writer configuration see the table property with the
same precedence as vanilla Spark. VeloxTransformerApi builds its Hadoop conf
from the merged options, and the Velox and Bolt backends reuse the helper for
their existing output-format reflection.
Re-enable the ignored Velox test case and turn the Bolt suite's discarded
Boolean comparison into an assert.
Fixes #12987
## How was this patch tested?
<!--
Describe how the changes were tested, if applicable.
Include new tests to validate the functionality, if necessary.
For UI-related changes, attach screenshots to demonstrate the updates.
-->
unit test
## Was this patch authored or co-authored using generative AI tooling?
<!--
If generative AI tooling has been used in the process of authoring this
patch, please include the
phrase: 'Generated-by: ' followed by the name of the tool and its version.
If no, write 'No'.
Please refer to the [ASF Generative Tooling
Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]