File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,11 +84,11 @@ pub(crate) fn init_datasource_exec(
8484
8585 // Determine the schema to use for ParquetSource
8686 // // Use data_schema only if both data_schema and data_filters are set
87- // let base_schema = match (&data_schema, &data_filters ) {
88- // (Some(schema), Some(_)) => Arc::clone(schema),
89- // _ => Arc::clone(&required_schema),
90- // };
91- let base_schema = required_schema;
87+ let base_schema = match ( & data_schema, & projection_vector ) {
88+ ( Some ( schema) , Some ( _) ) => Arc :: clone ( schema) ,
89+ _ => Arc :: clone ( & required_schema) ,
90+ } ;
91+ // let base_schema = required_schema;
9292 // dbg!(&base_schema);
9393 // dbg!(&data_schema);
9494 // dbg!(&data_filters);
Original file line number Diff line number Diff line change @@ -906,10 +906,10 @@ pub fn spark_cast(
906906 data_type : & DataType ,
907907 cast_options : & SparkCastOptions ,
908908) -> DataFusionResult < ColumnarValue > {
909- let input_type = match & arg {
910- ColumnarValue :: Array ( array) => array. data_type ( ) . clone ( ) ,
911- ColumnarValue :: Scalar ( scalar) => scalar. data_type ( ) ,
912- } ;
909+ // let input_type = match &arg {
910+ // ColumnarValue::Array(array) => array.data_type().clone(),
911+ // ColumnarValue::Scalar(scalar) => scalar.data_type(),
912+ // };
913913
914914 let result = match arg {
915915 ColumnarValue :: Array ( array) => {
@@ -927,10 +927,10 @@ pub fn spark_cast(
927927 }
928928 } ;
929929
930- let result_type = match & result {
931- ColumnarValue :: Array ( array) => array. data_type ( ) . clone ( ) ,
932- ColumnarValue :: Scalar ( scalar) => scalar. data_type ( ) ,
933- } ;
930+ // let result_type = match &result {
931+ // ColumnarValue::Array(array) => array.data_type().clone(),
932+ // ColumnarValue::Scalar(scalar) => scalar.data_type(),
933+ // };
934934
935935 // println!(
936936 // "spark_cast: {} -> {} (requested: {})",
Original file line number Diff line number Diff line change @@ -115,8 +115,8 @@ impl PhysicalExpr for ToCsv {
115115 ) ) )
116116 }
117117
118- fn fmt_sql ( & self , _ : & mut Formatter < ' _ > ) -> std:: fmt:: Result {
119- unimplemented ! ( )
118+ fn fmt_sql ( & self , f : & mut Formatter < ' _ > ) -> std:: fmt:: Result {
119+ Display :: fmt ( self , f )
120120 }
121121}
122122
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ use arrow::datatypes::{DataType, Schema};
2020use datafusion:: common:: { internal_err, Result } ;
2121use datafusion:: physical_expr:: PhysicalExpr ;
2222use datafusion:: physical_plan:: ColumnarValue ;
23- use std:: fmt:: Formatter ;
23+ use std:: fmt:: { Display , Formatter } ;
2424use std:: { hash:: Hash , sync:: Arc } ;
2525
2626/// This is similar to `UnKnownColumn` in DataFusion, but it has data type.
@@ -64,8 +64,8 @@ impl PhysicalExpr for UnboundColumn {
6464 self
6565 }
6666
67- fn fmt_sql ( & self , _ : & mut Formatter < ' _ > ) -> std:: fmt:: Result {
68- unimplemented ! ( )
67+ fn fmt_sql ( & self , f : & mut Formatter < ' _ > ) -> std:: fmt:: Result {
68+ Display :: fmt ( self , f )
6969 }
7070
7171 /// Get the data type of this expression, given the schema of the input
You can’t perform that action at this time.
0 commit comments