MCPcopy Create free account
hub / github.com/apache/arrow-rs / with_keys_field

Method with_keys_field

arrow-array/src/builder/map_builder.rs:122–127  ·  view source on GitHub ↗

Override the field passed to [`MapBuilder::new`] By default, a non-nullable field is created with the name `keys` Note: [`Self::finish`] and [`Self::finish_cloned`] will panic if the field's data type does not match that of `K` or the field is nullable

(self, field: impl Into<FieldRef>)

Source from the content-addressed store, hash-verified

120 /// Note: [`Self::finish`] and [`Self::finish_cloned`] will panic if the
121 /// field's data type does not match that of `K` or the field is nullable
122 pub fn with_keys_field(self, field: impl Into<FieldRef>) -> Self {
123 Self {
124 key_field: Some(field.into()),
125 ..self
126 }
127 }
128
129 /// Override the field passed to [`MapBuilder::new`]
130 ///

Callers 4

make_builderFunction · 0.80
test_with_keys_fieldFunction · 0.80

Calls

no outgoing calls

Tested by 3

test_with_keys_fieldFunction · 0.64