MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / plan_select_sql

Function plan_select_sql

nodedb-sql/src/planner/select/tests.rs:134–146  ·  view source on GitHub ↗
(sql: &str)

Source from the content-addressed store, hash-verified

132}
133
134fn plan_select_sql(sql: &str) -> SqlPlan {
135 // Run preprocessor so operator rewrites (`<->`, `<=>`, `<#>`) are applied
136 // before sqlparser sees the SQL.
137 let (preprocessed_sql, temporal) = match preprocess(sql).unwrap() {
138 Some(p) => (p.sql, p.temporal),
139 None => (sql.to_string(), crate::TemporalScope::default()),
140 };
141 let statements = parse_sql(&preprocessed_sql).unwrap();
142 let Statement::Query(query) = &statements[0] else {
143 panic!("expected query statement");
144 };
145 plan_query(query, &TestCatalog, &FunctionRegistry::new(), temporal).unwrap()
146}
147
148#[test]
149fn aggregate_subquery_join_filters_input_before_aggregation() {

Calls 4

preprocessFunction · 0.85
plan_queryFunction · 0.85
to_stringMethod · 0.80
parse_sqlFunction · 0.50

Tested by

no test coverage detected