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

Function main

datafusion/core/src/bin/print_functions_docs.rs:34–56  ·  view source on GitHub ↗

Print documentation for all functions of a given type to stdout Usage: `cargo run --bin print_functions_docs -- ` Called from `dev/update_function_docs.sh`

()

Source from the content-addressed store, hash-verified

32///
33/// Called from `dev/update_function_docs.sh`
34fn main() -> Result<()> {
35 let args: Vec<String> = args().collect();
36
37 if args.len() != 2 {
38 panic!(
39 "Usage: {} type (one of 'aggregate', 'scalar', 'window')",
40 args[0]
41 );
42 }
43
44 let function_type = args[1].trim().to_lowercase();
45 let docs = match function_type.as_str() {
46 "aggregate" => print_aggregate_docs(),
47 "scalar" => print_scalar_docs(),
48 "window" => print_window_docs(),
49 _ => {
50 panic!("Unknown function type: {function_type}")
51 }
52 }?;
53
54 println!("{docs}");
55 Ok(())
56}
57
58fn print_aggregate_docs() -> Result<String> {
59 let mut providers: Vec<Box<dyn DocProvider>> = vec![];

Callers

nothing calls this directly

Calls 7

print_aggregate_docsFunction · 0.85
print_scalar_docsFunction · 0.85
print_window_docsFunction · 0.85
collectMethod · 0.80
trimMethod · 0.80
lenMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…