@@ -65,8 +65,10 @@ pub(crate) fn init_datasource_exec(
6565 data_filters : Option < Vec < Arc < dyn PhysicalExpr > > > ,
6666 default_values : Option < HashMap < usize , ScalarValue > > ,
6767 session_timezone : & str ,
68+ case_sensitive : bool ,
6869) -> Result < Arc < DataSourceExec > , ExecutionError > {
69- let ( table_parquet_options, spark_parquet_options) = get_options ( session_timezone) ;
70+ let ( table_parquet_options, spark_parquet_options) =
71+ get_options ( session_timezone, case_sensitive) ;
7072 let mut parquet_source =
7173 ParquetSource :: new ( table_parquet_options) . with_schema_adapter_factory ( Arc :: new (
7274 SparkSchemaAdapterFactory :: new ( spark_parquet_options, default_values) ,
@@ -118,15 +120,18 @@ pub(crate) fn init_datasource_exec(
118120 Ok ( Arc :: new ( DataSourceExec :: new ( Arc :: new ( file_scan_config) ) ) )
119121}
120122
121- fn get_options ( session_timezone : & str ) -> ( TableParquetOptions , SparkParquetOptions ) {
123+ fn get_options (
124+ session_timezone : & str ,
125+ case_sensitive : bool ,
126+ ) -> ( TableParquetOptions , SparkParquetOptions ) {
122127 let mut table_parquet_options = TableParquetOptions :: new ( ) ;
123128 table_parquet_options. global . pushdown_filters = true ;
124129 table_parquet_options. global . reorder_filters = true ;
125130 table_parquet_options. global . coerce_int96 = Some ( "us" . to_string ( ) ) ;
126131 let mut spark_parquet_options =
127132 SparkParquetOptions :: new ( EvalMode :: Legacy , session_timezone, false ) ;
128133 spark_parquet_options. allow_cast_unsigned_ints = true ;
129- spark_parquet_options. case_sensitive = false ;
134+ spark_parquet_options. case_sensitive = case_sensitive ;
130135 ( table_parquet_options, spark_parquet_options)
131136}
132137
0 commit comments