[fix](planner) let OlapScanNode turn off preaggragation when there is a filter on DELETE_SIGN (#12118)
We can skip aggregate on replace column, otherwise it would generate wrong result. e.g. a row in UNIQUE is deleted by delte_sign_column, then it would be returned.
This commit is contained in:
@ -171,7 +171,8 @@ public class OlapScanNode extends ScanNode {
|
||||
|
||||
public void setIsPreAggregation(boolean isPreAggregation, String reason) {
|
||||
this.isPreAggregation = isPreAggregation;
|
||||
this.reasonOfPreAggregation = reason;
|
||||
this.reasonOfPreAggregation = this.reasonOfPreAggregation == null ? reason :
|
||||
this.reasonOfPreAggregation + " " + reason;
|
||||
}
|
||||
|
||||
public boolean isPreAggregation() {
|
||||
@ -1044,6 +1045,9 @@ public class OlapScanNode extends ScanNode {
|
||||
Expr conjunct = new BinaryPredicate(BinaryPredicate.Operator.EQ, deleteSignSlot, new IntLiteral(0));
|
||||
conjunct.analyze(analyzer);
|
||||
conjuncts.add(conjunct);
|
||||
if (!olapTable.getEnableUniqueKeyMergeOnWrite()) {
|
||||
closePreAggregation(Column.DELETE_SIGN + " is used as conjuncts.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user