HyukjinKwon commented on code in PR #37263:
URL: https://github.com/apache/spark/pull/37263#discussion_r930637736
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFileFormat.scala:
##########
@@ -126,6 +127,15 @@ class ParquetFileFormat
// Sets compression scheme
conf.set(ParquetOutputFormat.COMPRESSION,
parquetOptions.compressionCodecClassName)
+ // Sets Zstd level and Zstd workers, only effect when compression codec is
`zstd`
+ conf.set(
Review Comment:
You can use `setIfUnset` I believe. The main problem is that I am not sure
if it's worthwhile. For example, we don't expose a configuration for Parquet
writer v2 (e.g., `parquet.writer.version`).
Just for clarification, you are already able to set this via, e.g.:
```
val spark = SparkSession.
builder()
.master("local[*]")
.appName("AppName")
.config("spark.sql.parquet.compression.codec", "zstd")
.getOrCreate()
spark.sessionState.newHadoopConfWithOptions(
"parquet.compression.codec.zstd.level" -> "10",
"parquet.compression.codec.zstd.workers" -> "0"
)
val csvfile = spark.read.csv("file:///home/test_data/Reviews.csv")
csvfile.coalesce(1).write.parquet("file:///home/test_data/nn_parq_10")
```
I believe?
--
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]