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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/stats/ExpressionEstimation.java:
##########
@@ -140,12 +143,38 @@ public ColumnStatistic visitCaseWhen(CaseWhen caseWhen, 
Statistics context) {
         return columnStat.build();
     }
 
+    @Override
     public ColumnStatistic visitCast(Cast cast, Statistics context) {
         ColumnStatistic stats = context.findColumnStatistics(cast);
         if (stats != null) {
             return stats;
         }
-        return cast.child().accept(this, context);
+        ColumnStatistic childColStats = cast.child().accept(this, context);
+
+        return castMinMax(childColStats, cast.getDataType());
+    }
+
+    private ColumnStatistic castMinMax(ColumnStatistic colStats, DataType 
targetType) {
+        if (colStats.minExpr instanceof StringLiteral && 
targetType.isDateLikeType()) {

Review Comment:
   yes. this function should be expanded!



-- 
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]

Reply via email to