Skip to content

Commit e862539

Browse files
authored
refactor: standardize exec_from funcs arg order (#8809)
1 parent 78d3314 commit e862539

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

datafusion-cli/src/exec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ use url::Url;
5151
/// run and execute SQL statements and commands, against a context with the given print options
5252
pub async fn exec_from_commands(
5353
ctx: &mut SessionContext,
54-
print_options: &PrintOptions,
5554
commands: Vec<String>,
55+
print_options: &PrintOptions,
5656
) {
5757
for sql in commands {
5858
match exec_and_print(ctx, print_options, sql).await {
@@ -105,8 +105,8 @@ pub async fn exec_from_lines(
105105
}
106106

107107
pub async fn exec_from_files(
108-
files: Vec<String>,
109108
ctx: &mut SessionContext,
109+
files: Vec<String>,
110110
print_options: &PrintOptions,
111111
) {
112112
let files = files

datafusion-cli/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ pub async fn main() -> Result<()> {
216216

217217
if commands.is_empty() && files.is_empty() {
218218
if !rc.is_empty() {
219-
exec::exec_from_files(rc, &mut ctx, &print_options).await
219+
exec::exec_from_files(&mut ctx, rc, &print_options).await
220220
}
221221
// TODO maybe we can have thiserror for cli but for now let's keep it simple
222222
return exec::exec_from_repl(&mut ctx, &mut print_options)
@@ -225,11 +225,11 @@ pub async fn main() -> Result<()> {
225225
}
226226

227227
if !files.is_empty() {
228-
exec::exec_from_files(files, &mut ctx, &print_options).await;
228+
exec::exec_from_files(&mut ctx, files, &print_options).await;
229229
}
230230

231231
if !commands.is_empty() {
232-
exec::exec_from_commands(&mut ctx, &print_options, commands).await;
232+
exec::exec_from_commands(&mut ctx, commands, &print_options).await;
233233
}
234234

235235
Ok(())

0 commit comments

Comments
 (0)