@@ -41,8 +41,8 @@ pub struct CommonOpt {
4141 pub partitions : Option < usize > ,
4242
4343 /// Batch size when reading CSV or Parquet files
44- #[ structopt( short = "s" , long = "batch-size" , default_value = "8192" ) ]
45- pub batch_size : usize ,
44+ #[ structopt( short = "s" , long = "batch-size" ) ]
45+ pub batch_size : Option < usize > ,
4646
4747 /// The memory pool type to use, should be one of "fair" or "greedy"
4848 #[ structopt( long = "mem-pool-type" , default_value = "fair" ) ]
@@ -70,9 +70,10 @@ impl CommonOpt {
7070 }
7171
7272 /// Modify the existing config appropriately
73- pub fn update_config ( & self , config : SessionConfig ) -> SessionConfig {
74- let mut config = config
75- . with_batch_size ( self . batch_size ) ;
73+ pub fn update_config ( & self , mut config : SessionConfig ) -> SessionConfig {
74+ if let Some ( batch_size) = self . batch_size {
75+ config = config. with_batch_size ( batch_size)
76+ }
7677
7778 if let Some ( partitions) = self . partitions {
7879 config = config. with_target_partitions ( partitions)
@@ -82,6 +83,7 @@ impl CommonOpt {
8283 config =
8384 config. with_sort_spill_reservation_bytes ( sort_spill_reservation_bytes) ;
8485 }
86+
8587 config
8688 }
8789
0 commit comments