apache / parquet-java

Apache Parquet Java
https://parquet.apache.org/
Apache License 2.0
2.65k stars 1.41k forks source link

GH-2976: Parqurt CLI compression commands should accept lowercase compression name #2977

Closed pan3793 closed 3 months ago

pan3793 commented 3 months ago

Rationale for this change

Currently, there is inconsistent in different commands.

$ parquet convert c000.snappy.parquet -o c000.zstd.parquet --compression-codec zstd
$ parquet rewrite -i c000.snappy.parquet -o c000.zstd.parquet --compression-codec zstd
Argument error: No enum constant org.apache.parquet.hadoop.metadata.CompressionCodecName.zstd

For consistent user experience of Parquet CLI, we should allow lowercase codecs in all commands.

What changes are included in this PR?

Change Parquet CLI's trans-compression and rewrite commands to accept lowercase compression codec.

Are these changes tested?

Yes, new UTs are added.

Are there any user-facing changes?

Yes.

Close #2976