XieJiann commented on code in PR #29184:
URL: https://github.com/apache/doris/pull/29184#discussion_r1438116767
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java:
##########
@@ -394,6 +398,11 @@ public Statistics visitNot(Not not, EstimationContext
context) {
.setMaxValue(originColStats.maxValue)
.setMaxExpr(originColStats.maxExpr);
}
+ if (not.child().getInputSlots().size() == 1 && !(child
instanceof IsNull)) {
+ // only consider the single column numNull, otherwise,
ignore
+ rowCount = Math.max(rowCount - originColStats.numNulls, 1);
+ statisticsBuilder.setRowCount(rowCount);
+ }
Review Comment:
It could cause heavy errors when the child is unknow.
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java:
##########
@@ -394,6 +398,11 @@ public Statistics visitNot(Not not, EstimationContext
context) {
.setMaxValue(originColStats.maxValue)
.setMaxExpr(originColStats.maxExpr);
}
+ if (not.child().getInputSlots().size() == 1 && !(child
instanceof IsNull)) {
+ // only consider the single column numNull, otherwise,
ignore
+ rowCount = Math.max(rowCount - originColStats.numNulls, 1);
+ statisticsBuilder.setRowCount(rowCount);
+ }
Review Comment:
It could cause heavy errors when the child is unknown.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]