@@ -792,31 +792,63 @@ pub struct TransformCommand {
792792 #[ arg( long, value_enum) ]
793793 pub parquet_writer_version : Option < ParquetWriterVersion > ,
794794
795- /// Disable dictionary encoding for Parquet columns.
796- #[ arg( long) ]
795+ /// Disable dictionary encoding globally for all Parquet columns.
796+ ///
797+ /// Dictionary encoding builds a dictionary of unique values and stores references to it,
798+ /// which is very effective for low-cardinality columns (few unique values). When disabled,
799+ /// columns use their data page encoding directly.
800+ ///
801+ /// Default: dictionary encoding is enabled.
802+ ///
803+ /// Use --parquet-column-dictionary or --parquet-column-no-dictionary to override
804+ /// this setting for specific columns.
805+ #[ arg( long, verbatim_doc_comment) ]
797806 pub parquet_no_dictionary : bool ,
798807
799- /// Encoding for Parquet column data pages .
808+ /// Enable dictionary encoding for specific columns. Can be specified multiple times .
800809 ///
801- /// If dictionary encoding is disabled (via --parquet-no-dictionary), this is the primary
802- /// encoding for all columns. If dictionary encoding is enabled (the default), this is the
803- /// fallback encoding when dictionary encoding falls back (e.g., dictionary size exceeded).
810+ /// Overrides --parquet-no-dictionary for the named columns, enabling dictionary encoding
811+ /// even when it's globally disabled.
804812 ///
805- /// Options: plain, rle, delta-binary-packed, delta-length-byte-array, delta-byte-array, byte-stream-split
806- #[ arg( long, value_enum) ]
813+ /// Useful when most columns have high cardinality (dictionary disabled globally) but
814+ /// a few columns have low cardinality and would benefit from dictionary encoding.
815+ #[ arg( long, value_name = "COLUMN" , verbatim_doc_comment) ]
816+ pub parquet_column_dictionary : Vec < String > ,
817+
818+ /// Disable dictionary encoding for specific columns. Can be specified multiple times.
819+ ///
820+ /// Overrides the default (dictionary enabled) for the named columns.
821+ ///
822+ /// Useful for high-cardinality columns like UUIDs or timestamps where dictionary
823+ /// encoding adds overhead without compression benefit.
824+ #[ arg( long, value_name = "COLUMN" , verbatim_doc_comment) ]
825+ pub parquet_column_no_dictionary : Vec < String > ,
826+
827+ /// Data page encoding for Parquet columns.
828+ ///
829+ /// This encoding is used for column data pages. Its role depends on dictionary encoding:
830+ /// - Dictionary enabled (default): this is the fallback encoding, used when the dictionary
831+ /// becomes too large or is inefficient for the data.
832+ /// - Dictionary disabled: this is the primary encoding for all data.
833+ ///
834+ /// If not specified, the writer automatically selects an encoding based on column type
835+ /// and writer version. With Parquet v2: integers use delta-binary-packed, strings use
836+ /// delta-byte-array, booleans use rle. With Parquet v1: everything uses plain.
837+ ///
838+ /// Options: plain, rle, delta-binary-packed, delta-length-byte-array, delta-byte-array,
839+ /// byte-stream-split
840+ #[ arg( long, value_enum, verbatim_doc_comment) ]
807841 pub parquet_encoding : Option < ParquetEncoding > ,
808842
809- /// Set encoding for specific columns. Can be specified multiple times.
810- /// Overrides --parquet-encoding for the named column.
843+ /// Set data page encoding for specific columns. Can be specified multiple times.
811844 ///
812- /// If dictionary encoding is disabled for this column, this is the primary encoding.
813- /// If dictionary encoding is enabled (the default), this is the fallback encoding
814- /// when dictionary encoding falls back (e.g., dictionary size exceeded).
845+ /// Overrides --parquet-encoding for the named column. See --parquet-encoding for
846+ /// how this interacts with dictionary encoding.
815847 ///
816848 /// Format: COLUMN=ENCODING
817849 ///
818- /// Encoding options : plain, rle, delta-binary-packed, delta-length-byte-array,
819- /// delta-byte-array, byte-stream-split
850+ /// Options : plain, rle, delta-binary-packed, delta-length-byte-array, delta -byte-array,
851+ /// byte-stream-split
820852 ///
821853 /// Examples:
822854 /// --parquet-column-encoding id=delta-binary-packed
0 commit comments