Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions native/core/src/parquet/parquet_exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ pub(crate) fn init_datasource_exec(

// Determine the schema to use for ParquetSource
// // Use data_schema only if both data_schema and data_filters are set
// let base_schema = match (&data_schema, &data_filters) {
// (Some(schema), Some(_)) => Arc::clone(schema),
// _ => Arc::clone(&required_schema),
// };
let base_schema = required_schema;
let base_schema = match (&data_schema, &projection_vector) {
(Some(schema), Some(_)) => Arc::clone(schema),
_ => Arc::clone(&required_schema),
};
//let base_schema = required_schema;
// dbg!(&base_schema);
// dbg!(&data_schema);
// dbg!(&data_filters);
Expand Down
16 changes: 8 additions & 8 deletions native/spark-expr/src/conversion_funcs/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -906,10 +906,10 @@ pub fn spark_cast(
data_type: &DataType,
cast_options: &SparkCastOptions,
) -> DataFusionResult<ColumnarValue> {
let input_type = match &arg {
ColumnarValue::Array(array) => array.data_type().clone(),
ColumnarValue::Scalar(scalar) => scalar.data_type(),
};
// let input_type = match &arg {
// ColumnarValue::Array(array) => array.data_type().clone(),
// ColumnarValue::Scalar(scalar) => scalar.data_type(),
// };

let result = match arg {
ColumnarValue::Array(array) => {
Expand All @@ -927,10 +927,10 @@ pub fn spark_cast(
}
};

let result_type = match &result {
ColumnarValue::Array(array) => array.data_type().clone(),
ColumnarValue::Scalar(scalar) => scalar.data_type(),
};
// let result_type = match &result {
// ColumnarValue::Array(array) => array.data_type().clone(),
// ColumnarValue::Scalar(scalar) => scalar.data_type(),
// };

// println!(
// "spark_cast: {} -> {} (requested: {})",
Expand Down
4 changes: 2 additions & 2 deletions native/spark-expr/src/csv_funcs/to_csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ impl PhysicalExpr for ToCsv {
)))
}

fn fmt_sql(&self, _: &mut Formatter<'_>) -> std::fmt::Result {
unimplemented!()
fn fmt_sql(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
Display::fmt(self, f)
}
}

Expand Down
6 changes: 3 additions & 3 deletions native/spark-expr/src/unbound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use arrow::datatypes::{DataType, Schema};
use datafusion::common::{internal_err, Result};
use datafusion::physical_expr::PhysicalExpr;
use datafusion::physical_plan::ColumnarValue;
use std::fmt::Formatter;
use std::fmt::{Display, Formatter};
use std::{hash::Hash, sync::Arc};

/// This is similar to `UnKnownColumn` in DataFusion, but it has data type.
Expand Down Expand Up @@ -64,8 +64,8 @@ impl PhysicalExpr for UnboundColumn {
self
}

fn fmt_sql(&self, _: &mut Formatter<'_>) -> std::fmt::Result {
unimplemented!()
fn fmt_sql(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
Display::fmt(self, f)
}

/// Get the data type of this expression, given the schema of the input
Expand Down
Loading