@@ -21,7 +21,7 @@ use std::sync::Arc;
2121
2222use crate :: {
2323 _internal_datafusion_err, DataFusionError , Result ,
24- config:: { CdcOptions , ParquetOptions , TableParquetOptions } ,
24+ config:: { ParquetCdcOptions , ParquetOptions , TableParquetOptions } ,
2525} ;
2626
2727use arrow:: datatypes:: Schema ;
@@ -166,13 +166,13 @@ impl TryFrom<&TableParquetOptions> for WriterPropertiesBuilder {
166166 }
167167}
168168
169- /// Convert DataFusion's [`CdcOptions `] into parquet-rs's `Option<CdcOptions>`.
169+ /// Convert DataFusion's [`ParquetCdcOptions `] into parquet-rs's `Option<CdcOptions>`.
170170///
171171/// parquet-rs has no `enabled` flag; CDC is on when the option is `Some`. So a
172- /// disabled [`CdcOptions `] maps to `None`, and an enabled one to `Some` with the
173- /// chunking parameters.
174- impl From < & CdcOptions > for Option < parquet:: file:: properties:: CdcOptions > {
175- fn from ( value : & CdcOptions ) -> Self {
172+ /// disabled [`ParquetCdcOptions `] maps to `None`, and an enabled one to `Some`
173+ /// with the chunking parameters.
174+ impl From < & ParquetCdcOptions > for Option < parquet:: file:: properties:: CdcOptions > {
175+ fn from ( value : & ParquetCdcOptions ) -> Self {
176176 value
177177 . enabled
178178 . then_some ( parquet:: file:: properties:: CdcOptions {
@@ -183,20 +183,21 @@ impl From<&CdcOptions> for Option<parquet::file::properties::CdcOptions> {
183183 }
184184}
185185
186- /// Convert parquet-rs's `Option<&CdcOptions>` back into DataFusion's [`CdcOptions`].
186+ /// Convert parquet-rs's `Option<&CdcOptions>` back into DataFusion's
187+ /// [`ParquetCdcOptions`].
187188///
188189/// The presence of parquet-rs options means CDC was enabled, so `Some` maps to
189190/// `enabled: true`; `None` yields the disabled default.
190- impl From < Option < & parquet:: file:: properties:: CdcOptions > > for CdcOptions {
191+ impl From < Option < & parquet:: file:: properties:: CdcOptions > > for ParquetCdcOptions {
191192 fn from ( value : Option < & parquet:: file:: properties:: CdcOptions > ) -> Self {
192193 match value {
193- Some ( cdc) => CdcOptions {
194+ Some ( cdc) => ParquetCdcOptions {
194195 enabled : true ,
195196 min_chunk_size : cdc. min_chunk_size ,
196197 max_chunk_size : cdc. max_chunk_size ,
197198 norm_level : cdc. norm_level ,
198199 } ,
199- None => CdcOptions :: default ( ) ,
200+ None => ParquetCdcOptions :: default ( ) ,
200201 }
201202 }
202203}
@@ -427,7 +428,7 @@ mod tests {
427428 #[ cfg( feature = "parquet_encryption" ) ]
428429 use crate :: config:: ConfigFileEncryptionProperties ;
429430 use crate :: config:: {
430- CdcOptions , ParquetColumnOptions , ParquetEncryptionOptions , ParquetOptions ,
431+ ParquetCdcOptions , ParquetColumnOptions , ParquetEncryptionOptions , ParquetOptions ,
431432 } ;
432433 use crate :: parquet_config:: DFParquetWriterVersion ;
433434 use parquet:: basic:: Compression ;
@@ -833,7 +834,7 @@ mod tests {
833834 #[ test]
834835 fn test_cdc_enabled_with_custom_options ( ) {
835836 let mut opts = TableParquetOptions :: default ( ) ;
836- opts. global . content_defined_chunking = CdcOptions {
837+ opts. global . content_defined_chunking = ParquetCdcOptions {
837838 enabled : true ,
838839 min_chunk_size : 128 * 1024 ,
839840 max_chunk_size : 512 * 1024 ,
@@ -861,7 +862,7 @@ mod tests {
861862 fn test_cdc_params_ignored_when_disabled ( ) {
862863 // Parameters are customized but `enabled` is false, so CDC stays off.
863864 let mut opts = TableParquetOptions :: default ( ) ;
864- opts. global . content_defined_chunking = CdcOptions {
865+ opts. global . content_defined_chunking = ParquetCdcOptions {
865866 enabled : false ,
866867 min_chunk_size : 128 * 1024 ,
867868 max_chunk_size : 512 * 1024 ,
@@ -876,7 +877,7 @@ mod tests {
876877 #[ test]
877878 fn test_cdc_round_trip_through_writer_props ( ) {
878879 let mut opts = TableParquetOptions :: default ( ) ;
879- opts. global . content_defined_chunking = CdcOptions {
880+ opts. global . content_defined_chunking = ParquetCdcOptions {
880881 enabled : true ,
881882 min_chunk_size : 64 * 1024 ,
882883 max_chunk_size : 2 * 1024 * 1024 ,
0 commit comments