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

Function get_execution_details_formatted

datafusion-cli/src/print_options.rs:88–106  ·  view source on GitHub ↗

Returns the query execution details formatted

(
    row_count: usize,
    maxrows: MaxRows,
    query_start_time: Instant,
)

Source from the content-addressed store, hash-verified

86
87// Returns the query execution details formatted
88fn get_execution_details_formatted(
89 row_count: usize,
90 maxrows: MaxRows,
91 query_start_time: Instant,
92) -> String {
93 let nrows_shown_msg = match maxrows {
94 MaxRows::Limited(nrows) if nrows < row_count => {
95 format!("(First {nrows} displayed. Use --maxrows to adjust)")
96 }
97 _ => String::new(),
98 };
99
100 format!(
101 "{} row(s) fetched. {}\nElapsed {:.3} seconds.\n",
102 row_count,
103 nrows_shown_msg,
104 query_start_time.elapsed().as_secs_f64()
105 )
106}
107
108impl PrintOptions {
109 /// Print the batches to stdout using the specified format

Callers 2

print_batchesMethod · 0.85
print_streamMethod · 0.85

Calls 1

newFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…