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

Function custom_query_planner

datafusion/core/src/execution/context/mod.rs:2554–2567  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2552
2553 #[tokio::test]
2554 async fn custom_query_planner() -> Result<()> {
2555 let runtime = Arc::new(RuntimeEnv::default());
2556 let session_state = SessionStateBuilder::new()
2557 .with_config(SessionConfig::new())
2558 .with_runtime_env(runtime)
2559 .with_default_features()
2560 .with_query_planner(Arc::new(MyQueryPlanner {}))
2561 .build();
2562 let ctx = SessionContext::new_with_state(session_state);
2563
2564 let df = ctx.sql("SELECT 1").await?;
2565 df.collect().await.expect_err("query not supported");
2566 Ok(())
2567 }
2568
2569 #[tokio::test]
2570 async fn disabled_default_catalog_and_schema() -> Result<()> {

Callers

nothing calls this directly

Calls 8

newFunction · 0.85
with_query_plannerMethod · 0.80
with_default_featuresMethod · 0.80
sqlMethod · 0.80
collectMethod · 0.80
buildMethod · 0.45
with_runtime_envMethod · 0.45
with_configMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…