Skip to content

Commit 77b24e3

Browse files
update ScalarType data_type map
1 parent 11e601f commit 77b24e3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/common/data_type.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ impl DataTypeMap {
248248
}
249249

250250
/// Maps a `ScalarValue` to an Arrow `DataType`
251+
/// TODO: Why not just use `ScalarValue::data_type`?
251252
pub fn map_from_scalar_to_arrow(scalar_val: &ScalarValue) -> Result<DataType, PyErr> {
252253
match scalar_val {
253254
ScalarValue::Boolean(_) => Ok(DataType::Boolean),
@@ -326,9 +327,11 @@ impl DataTypeMap {
326327
ScalarValue::Union(_, _, _) => Err(py_datafusion_err(DataFusionError::NotImplemented(
327328
"ScalarValue::LargeList".to_string(),
328329
))),
329-
ScalarValue::Utf8View(_) => todo!(),
330-
ScalarValue::BinaryView(_) => todo!(),
331-
ScalarValue::Map(_) => todo!(),
330+
ScalarValue::Utf8View(_) => Ok(DataType::Utf8View),
331+
ScalarValue::BinaryView(_) => Ok(DataType::BinaryView),
332+
ScalarValue::Map(_) => Err(py_datafusion_err(DataFusionError::NotImplemented(
333+
"ScalarValue::Map".to_string(),
334+
))),
332335
}
333336
}
334337
}

0 commit comments

Comments
 (0)