Skip to content

Fix Explain Analyze#66

Merged
krinart merged 1 commit into
spiceai-52from
viktor/fix-explain-analyze
Mar 27, 2026
Merged

Fix Explain Analyze#66
krinart merged 1 commit into
spiceai-52from
viktor/fix-explain-analyze

Conversation

@krinart
Copy link
Copy Markdown

@krinart krinart commented Mar 27, 2026

🗣 Description

Fix EXPLAIN ANALYZE on federated queries by preventing the federation analyzer from wrapping Analyze plan nodes, allowing only the inner query to be federated while DataFusion's AnalyzeExec handles metrics collection.

@krinart krinart self-assigned this Mar 27, 2026
Copilot AI review requested due to automatic review settings March 27, 2026 19:52
@krinart krinart added the bug Something isn't working label Mar 27, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes federated EXPLAIN ANALYZE by ensuring federation does not wrap LogicalPlan::Analyze, so DataFusion’s AnalyzeExec can collect metrics while only the inner query is federated.

Changes:

  • Skip calling the federation provider analyzer when the current plan node is LogicalPlan::Analyze(_), preventing top-level federation of EXPLAIN ANALYZE.
  • Add a regression test asserting the root logical node remains Analyze, the inner query contains a Federated node, and physical planning produces AnalyzeExec.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
datafusion-federation/src/analyzer/mod.rs Prevents federation of LogicalPlan::Analyze nodes by bypassing provider-level federation at that node and allowing child federation instead.
datafusion-federation/src/sql/mod.rs Adds a regression test to validate EXPLAIN ANALYZE is planned/executed correctly with federation only on the inner query.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@krinart krinart merged commit 7b37778 into spiceai-52 Mar 27, 2026
15 checks passed
@krinart krinart deleted the viktor/fix-explain-analyze branch March 27, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants