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

Function result_vec

datafusion/core/tests/sql/mod.rs:222–235  ·  view source on GitHub ↗

Converts the results into a 2d array of strings, `result[row][column]` Special cases nulls to NULL for testing

(results: &[RecordBatch])

Source from the content-addressed store, hash-verified

220/// Converts the results into a 2d array of strings, `result[row][column]`
221/// Special cases nulls to NULL for testing
222fn result_vec(results: &[RecordBatch]) -> Vec<Vec<String>> {
223 let mut result = vec![];
224 for batch in results {
225 for row_index in 0..batch.num_rows() {
226 let row_vec = batch
227 .columns()
228 .iter()
229 .map(|column| col_str(column, row_index))
230 .collect();
231 result.push(row_vec);
232 }
233 }
234 result
235}
236
237async fn register_alltypes_parquet(ctx: &SessionContext) {
238 let testdata = test_util::parquet_test_data();

Callers 3

csv_explain_plansFunction · 0.85
executeFunction · 0.85

Calls 6

col_strFunction · 0.85
collectMethod · 0.80
columnsMethod · 0.80
mapMethod · 0.45
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…