You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add EXPLAIN and EXPLAIN ANALYZE support to federated queries
When federating EXPLAIN or EXPLAIN ANALYZE queries, the SQL generator now
correctly prefixes the unparsed federated query with EXPLAIN or
EXPLAIN ANALYZE respectively. This ensures that remote databases
receive the full query intent including the EXPLAIN directive.
Changes:
- Detect LogicalPlan::Explain and LogicalPlan::Analyze variants in
VirtualExecutionPlan::final_sql()
- Extract the inner plan and apply all rewrites and optimizations
- Prefix the final SQL with 'EXPLAIN ' or 'EXPLAIN ANALYZE '
- Extract common rewrite logic into rewrite_plan_to_sql() helper
- Add test cases for both EXPLAIN and EXPLAIN ANALYZE queries
- Remove unused sources/sql/src/lib.rs (not wired into workspace)
0 commit comments