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:
- Import Explain from datafusion::logical_expr
- Detect LogicalPlan::Explain variant in VirtualExecutionPlan::final_sql()
- Extract the inner plan from EXPLAIN and apply all rewrites and optimizations
- Prefix the final SQL with 'EXPLAIN ' or 'EXPLAIN ANALYZE ' based on the analyze flag
- Maintain all existing table rewrites, logical optimizations, and AST transformations
0 commit comments