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

Function all_commands_info

datafusion-cli/src/command.rs:188–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186];
187
188fn all_commands_info() -> RecordBatch {
189 let schema = Arc::new(Schema::new(vec![
190 Field::new("Command", DataType::Utf8, false),
191 Field::new("Description", DataType::Utf8, false),
192 ]));
193 let (names, description): (Vec<&str>, Vec<&str>) = ALL_COMMANDS
194 .into_iter()
195 .map(|c| c.get_name_and_description())
196 .unzip();
197 RecordBatch::try_new(
198 schema,
199 [names, description]
200 .into_iter()
201 .map(|i| Arc::new(StringArray::from(i)) as ArrayRef)
202 .collect::<Vec<_>>(),
203 )
204 .expect("This should not fail")
205}
206
207impl FromStr for Command {
208 type Err = ();

Callers 1

executeMethod · 0.85

Calls 4

newFunction · 0.85
mapMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…