Skip to content

Commit 93a5155

Browse files
fix logicalproject uniform pull up
1 parent b934881 commit 93a5155

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalProject.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,12 @@ public void computeUniform(DataTrait.Builder builder) {
245245
builder.addUniformSlotAndLiteral(proj.toSlot(), proj.child(0));
246246
} else if (proj.child(0) instanceof Slot) {
247247
Slot slot = (Slot) proj.child(0);
248-
if (child(0).getLogicalProperties().getTrait().isUniformAndHasConstValue(slot)) {
248+
DataTrait childTrait = child(0).getLogicalProperties().getTrait();
249+
if (childTrait.isUniformAndHasConstValue(slot)) {
249250
builder.addUniformSlotAndLiteral(proj.toSlot(),
250251
child(0).getLogicalProperties().getTrait().getUniformValue(slot).get());
252+
} else if (childTrait.isUniform(slot)) {
253+
builder.addUniformSlot(proj.toSlot());
251254
}
252255
}
253256
}

0 commit comments

Comments
 (0)