Skip to content

Commit

Permalink
update ScalarType data_type map
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-J-Ward committed Jul 25, 2024
1 parent 11e601f commit 77b24e3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/common/data_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ impl DataTypeMap {
}

/// Maps a `ScalarValue` to an Arrow `DataType`
/// TODO: Why not just use `ScalarValue::data_type`?
pub fn map_from_scalar_to_arrow(scalar_val: &ScalarValue) -> Result<DataType, PyErr> {
match scalar_val {
ScalarValue::Boolean(_) => Ok(DataType::Boolean),
Expand Down Expand Up @@ -326,9 +327,11 @@ impl DataTypeMap {
ScalarValue::Union(_, _, _) => Err(py_datafusion_err(DataFusionError::NotImplemented(
"ScalarValue::LargeList".to_string(),
))),
ScalarValue::Utf8View(_) => todo!(),
ScalarValue::BinaryView(_) => todo!(),
ScalarValue::Map(_) => todo!(),
ScalarValue::Utf8View(_) => Ok(DataType::Utf8View),
ScalarValue::BinaryView(_) => Ok(DataType::BinaryView),
ScalarValue::Map(_) => Err(py_datafusion_err(DataFusionError::NotImplemented(
"ScalarValue::Map".to_string(),
))),
}
}
}
Expand Down

0 comments on commit 77b24e3

Please sign in to comment.