From 716ae6d2c13d24eac6db171014d87a9e7db33117 Mon Sep 17 00:00:00 2001 From: comphead Date: Tue, 12 Aug 2025 11:41:58 -0700 Subject: [PATCH 1/4] chore: Clarify `EmptyRelation` description --- datafusion/expr/src/logical_plan/plan.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datafusion/expr/src/logical_plan/plan.rs b/datafusion/expr/src/logical_plan/plan.rs index d68e6cd812725..49dc89f7d4281 100644 --- a/datafusion/expr/src/logical_plan/plan.rs +++ b/datafusion/expr/src/logical_plan/plan.rs @@ -2040,7 +2040,7 @@ impl ToStringifiedPlan for LogicalPlan { } } -/// Produces no rows: An empty relation with an empty schema +/// Relationship produces 0 or 1 placeholder rows with specified output schema #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct EmptyRelation { /// Whether to produce a placeholder row From 6be415cd79afff2a5bb430052fdaf5dece967d9c Mon Sep 17 00:00:00 2001 From: comphead Date: Tue, 12 Aug 2025 12:14:49 -0700 Subject: [PATCH 2/4] chore: Clarify `EmptyRelation` description --- datafusion/expr/src/logical_plan/plan.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datafusion/expr/src/logical_plan/plan.rs b/datafusion/expr/src/logical_plan/plan.rs index 49dc89f7d4281..6fa500b2da2bc 100644 --- a/datafusion/expr/src/logical_plan/plan.rs +++ b/datafusion/expr/src/logical_plan/plan.rs @@ -2041,6 +2041,8 @@ impl ToStringifiedPlan for LogicalPlan { } /// Relationship produces 0 or 1 placeholder rows with specified output schema +/// In most cases the output schema for `EmptyRelation` would be empty +/// However it can be non empty for places like join/union, etc #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct EmptyRelation { /// Whether to produce a placeholder row From d771189ca6b05e71627efa9046ca87d5ab80ed5f Mon Sep 17 00:00:00 2001 From: comphead Date: Tue, 12 Aug 2025 12:15:52 -0700 Subject: [PATCH 3/4] chore: Clarify `EmptyRelation` description --- datafusion/expr/src/logical_plan/plan.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datafusion/expr/src/logical_plan/plan.rs b/datafusion/expr/src/logical_plan/plan.rs index 6fa500b2da2bc..6a9bc917b83f4 100644 --- a/datafusion/expr/src/logical_plan/plan.rs +++ b/datafusion/expr/src/logical_plan/plan.rs @@ -2041,8 +2041,8 @@ impl ToStringifiedPlan for LogicalPlan { } /// Relationship produces 0 or 1 placeholder rows with specified output schema -/// In most cases the output schema for `EmptyRelation` would be empty -/// However it can be non empty for places like join/union, etc +/// In most cases the output schema for `EmptyRelation` would be empty, +/// however, it can be non-empty when using with join/union, etc #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct EmptyRelation { /// Whether to produce a placeholder row From 288b123742813083d06de892e374e07531542c08 Mon Sep 17 00:00:00 2001 From: comphead Date: Tue, 12 Aug 2025 12:53:59 -0700 Subject: [PATCH 4/4] chore: Clarify `EmptyRelation` description --- datafusion/expr/src/logical_plan/plan.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datafusion/expr/src/logical_plan/plan.rs b/datafusion/expr/src/logical_plan/plan.rs index 6a9bc917b83f4..01dcc3a743941 100644 --- a/datafusion/expr/src/logical_plan/plan.rs +++ b/datafusion/expr/src/logical_plan/plan.rs @@ -2042,7 +2042,7 @@ impl ToStringifiedPlan for LogicalPlan { /// Relationship produces 0 or 1 placeholder rows with specified output schema /// In most cases the output schema for `EmptyRelation` would be empty, -/// however, it can be non-empty when using with join/union, etc +/// however, it can be non-empty typically for optimizer rules #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct EmptyRelation { /// Whether to produce a placeholder row