Skip to content

Differentiate 0-row and 1-row EmptyRelation in EXPLAIN #17145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

findepi
Copy link
Member

@findepi findepi commented Aug 12, 2025

The LogicalPlan::EmptyRelation can produce no rows or exactly 1 null (placeholder) row of the requested schema. When viewing EXPLAIN output of a LogicalPlan it's good to know which one is the case.

@github-actions github-actions bot added logical-expr Logical plan and expressions core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Aug 12, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Makes sense to me -- thank you @findepi

@findepi findepi force-pushed the findepi/differentiate-0-row-and-1-row-emptyrelation-in-explain-8c8b44 branch from 2aed032 to cd04fce Compare August 12, 2025 15:05
@github-actions github-actions bot added the optimizer Optimizer rules label Aug 12, 2025
@findepi findepi force-pushed the findepi/differentiate-0-row-and-1-row-emptyrelation-in-explain-8c8b44 branch from cd04fce to e483045 Compare August 12, 2025 15:13
@github-actions github-actions bot added the sql SQL Planner label Aug 12, 2025
@findepi findepi force-pushed the findepi/differentiate-0-row-and-1-row-emptyrelation-in-explain-8c8b44 branch 4 times, most recently from 138fdfe to 2dd6061 Compare August 12, 2025 20:04
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Aug 12, 2025
@findepi findepi force-pushed the findepi/differentiate-0-row-and-1-row-emptyrelation-in-explain-8c8b44 branch 2 times, most recently from 8cd9e4c to 1df7580 Compare August 12, 2025 20:40
The `LogicalPlan::EmptyRelation` can produce no rows or exactly 1 null
(placeholder) row of the requested schema. When viewing EXPLAIN output
of a LogicalPlan it's good to know which one is the case.
@findepi
Copy link
Member Author

findepi commented Aug 12, 2025

Rebased after #17139 merged, to resolve logical conflicts.

@findepi findepi force-pushed the findepi/differentiate-0-row-and-1-row-emptyrelation-in-explain-8c8b44 branch from 1df7580 to 5b5b90d Compare August 12, 2025 20:47
@findepi findepi merged commit 43718d5 into apache:main Aug 13, 2025
28 checks passed
@findepi findepi deleted the findepi/differentiate-0-row-and-1-row-emptyrelation-in-explain-8c8b44 branch August 13, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate documentation Improvements or additions to documentation logical-expr Logical plan and expressions optimizer Optimizer rules sql SQL Planner sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants