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

Function basic_execute

datafusion/wasmtest/src/lib.rs:142–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

140
141 #[wasm_bindgen_test(unsupported = tokio::test)]
142 async fn basic_execute() {
143 let sql = "SELECT 2 + 2;";
144
145 // Execute SQL (using datafusion)
146
147 let session_context = get_ctx();
148 let statement = DFParser::parse_sql(sql).unwrap().pop_back().unwrap();
149
150 let logical_plan = session_context
151 .state()
152 .statement_to_plan(statement)
153 .await
154 .unwrap();
155 let data_frame = session_context
156 .execute_logical_plan(logical_plan)
157 .await
158 .unwrap();
159 let physical_plan = data_frame.create_physical_plan().await.unwrap();
160
161 let task_ctx = session_context.task_ctx();
162 let _ = collect(physical_plan, task_ctx).await.unwrap();
163 }
164
165 #[wasm_bindgen_test(unsupported = tokio::test)]
166 async fn basic_df_function_execute() {

Callers

nothing calls this directly

Calls 7

get_ctxFunction · 0.85
collectFunction · 0.50
statement_to_planMethod · 0.45
stateMethod · 0.45
execute_logical_planMethod · 0.45
create_physical_planMethod · 0.45
task_ctxMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…