You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/10/24 04:02:16 UTC

[GitHub] [doris] englefly commented on a diff in pull request #13375: [feature](nereids) Estimate plan cost by column ndv and table row count

englefly commented on code in PR #13375:
URL: https://github.com/apache/doris/pull/13375#discussion_r1002866177


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/stats/ExpressionEstimation.java:
##########
@@ -56,12 +62,20 @@ public ColumnStat visit(Expression expr, StatsDeriveResult context) {
         return expr.accept(this, context);
     }
 
+    public ColumnStat visitCaseWhen(CaseWhen caseWhen, StatsDeriveResult context) {
+        throw new RuntimeException("ExpressionEstimation case-when not implemented");
+    }
+
+    public ColumnStat visitCast(Cast cast, StatsDeriveResult context) {
+        return cast.child().accept(this, context);
+    }
+
     @Override
     public ColumnStat visitLiteral(Literal literal, StatsDeriveResult context) {
-        if (literal.isStringLiteral()) {
+        if (ColumnStat.MAX_MIN_UNSUPPORTED_TYPE.contains(literal.getDataType().toCatalogDataType())) {
             return ColumnStat.UNKNOWN;

Review Comment:
   'unknown' is the default value



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org