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

Function exec_from_files

datafusion-cli/src/exec.rs:110–126  ·  view source on GitHub ↗
(
    ctx: &dyn CliSessionContext,
    files: Vec<String>,
    print_options: &PrintOptions,
)

Source from the content-addressed store, hash-verified

108}
109
110pub async fn exec_from_files(
111 ctx: &dyn CliSessionContext,
112 files: Vec<String>,
113 print_options: &PrintOptions,
114) -> Result<()> {
115 let files = files
116 .into_iter()
117 .map(|file_path| File::open(file_path).unwrap())
118 .collect::<Vec<_>>();
119
120 for file in files {
121 let mut reader = BufReader::new(file);
122 exec_from_lines(ctx, &mut reader, print_options).await?;
123 }
124
125 Ok(())
126}
127
128/// run and execute SQL statements and commands against a context with the given print options
129pub async fn exec_from_repl(

Callers 1

main_innerFunction · 0.85

Calls 4

newFunction · 0.85
exec_from_linesFunction · 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…