Stove-hust commented on a change in pull request #35363:
URL: https://github.com/apache/spark/pull/35363#discussion_r813641193



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/FilterEstimation.scala
##########
@@ -311,6 +311,16 @@ case class FilterEstimation(plan: Filter) extends Logging {
       logDebug("[CBO] No statistics for " + attr)
       return None
     }
+
+    attr.dataType match {
+      case _: NumericType | DateType | TimestampType | BooleanType =>
+        if (!colStatsMap.hasMinMaxStats(attr)) {

Review comment:
       > sorry I haven't touched CBO for a while and need more context to warm 
up.
   > 
   > How can this happen? We checked `if (!colStatsMap.contains(attr))` before, 
and it's weird that a column has statistics but has no basic min/max data.
   
   min/max is indeed available, but for me, I don't use min/max at the moment, 
so I don't store it。
   More importantly, based on SPARK-23445 considerations:
   > min, max and histogram for columns were optional already. Having them all 
optional is more consistent......




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