felixloesing opened a new pull request, #13777: URL: https://github.com/apache/gluten/pull/13777
## What changes are proposed in this pull request? This is a small follow-up to [#12072](https://github.com/apache/gluten/pull/12072) ([GLUTEN-12071](https://github.com/apache/gluten/issues/12071)), so the native Parquet writer picks its compression codec the same way vanilla Spark does. [#12072 ](https://github.com/apache/gluten/pull/12072) merged the Hadoop configuration into the write options. That lets native writes pick up writer settings like `spark.hadoop.parquet.enable.dictionary`, which is the right behavior. But the merged options are also used to choose the codec, so `spark.hadoop.parquet.compression` now beats `spark.sql.parquet.compression.codec`. Vanilla Spark doesn't read the codec from the Hadoop configuration. `ParquetOptions` checks the compression write option, then the `parquet.compression` write option, then `spark.sql.parquet.compression.codec`. As a result, with `spark.hadoop.parquet.compression=gzip` and `spark.sql.parquet.compression.codec=zstd`: - Spark writes `zstd` files. - Gluten writes `gzip` files. This PR picks the codec from the explicit write options and SQLConf only. The full merged options are still passed to the native writer, so other Hadoop settings from [#12072](https://github.com/apache/gluten/pull/12072) still apply. Explicit compression and parquet.compression write options still take precedence, as in Spark. ## How was this patch tested? Added a test to `VeloxParquetWriteHadoopConfSuite`. It sets `spark.hadoop.parquet.compression=gzip` and `spark.sql.parquet.compression.codec=zstd`, checks that the write used the native writer, and checks that every column chunk in the output footer is `ZSTD`. Without this change, the footer says `GZIP.` The existing [#12072](https://github.com/apache/gluten/pull/12072) dictionary test still covers Hadoop settings reaching the writer. ## Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) -- 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]
