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

Function list_ndims

datafusion/common/src/utils/mod.rs:759–768  ·  view source on GitHub ↗

Compute the number of dimensions in a list data type.

(data_type: &DataType)

Source from the content-addressed store, hash-verified

757
758/// Compute the number of dimensions in a list data type.
759pub fn list_ndims(data_type: &DataType) -> u64 {
760 match data_type {
761 DataType::List(field)
762 | DataType::LargeList(field)
763 | DataType::ListView(field)
764 | DataType::LargeListView(field)
765 | DataType::FixedSizeList(field, _) => 1 + list_ndims(field.data_type()),
766 _ => 0,
767 }
768}
769
770/// Adopted from strsim-rs for string similarity metrics
771pub mod datafusion_strsim {

Callers 6

coerced_fromFunction · 0.85
align_array_dimensionsFunction · 0.85
general_list_ndimsFunction · 0.85
plan_binary_opMethod · 0.85
return_typeMethod · 0.85

Calls 1

data_typeMethod · 0.45

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…