We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bc7fd2 commit 3051cd4Copy full SHA for 3051cd4
datafusion/physical-expr/src/equivalence/properties.rs
@@ -1843,6 +1843,11 @@ fn calculate_union_binary(
1843
.map(|rhs_const| {
1844
let mut const_expr = ConstExpr::new(Arc::clone(lhs_const.expr()));
1845
1846
+ // If both sides are constant across partitions, set across_partitions=true
1847
+ if lhs_const.across_partitions() && rhs_const.across_partitions() {
1848
+ const_expr = const_expr.with_across_partitions(true);
1849
+ }
1850
+
1851
// If both sides have matching constant values, preserve the value and set across_partitions=true
1852
if let (Some(lhs_val), Some(rhs_val)) =
1853
(lhs_const.value(), rhs_const.value())
0 commit comments