MCPcopy Create free account
hub / github.com/apache/datafusion / get_first_array_ref

Function get_first_array_ref

datafusion/functions-nested/src/map.rs:230–240  ·  view source on GitHub ↗
(columnar_value: &ColumnarValue)

Source from the content-addressed store, hash-verified

228}
229
230fn get_first_array_ref(columnar_value: &ColumnarValue) -> Result<ArrayRef> {
231 match columnar_value {
232 ColumnarValue::Scalar(value) => match value {
233 ScalarValue::List(array) => Ok(array.value(0)),
234 ScalarValue::LargeList(array) => Ok(array.value(0)),
235 ScalarValue::FixedSizeList(array) => Ok(array.value(0)),
236 _ => exec_err!("Expected array, got {}", value),
237 },
238 ColumnarValue::Array(array) => Ok(array.to_owned()),
239 }
240}
241
242fn make_map_batch_internal(
243 keys: &ArrayRef,

Callers 1

make_map_batchFunction · 0.85

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…