flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] KurtYoung commented on a change in pull request #10196: [FLINK-14789] [table-planner-blink] extends max/min type in ColumnStats from Number to Comparable
Date Fri, 15 Nov 2019 14:13:00 GMT
KurtYoung commented on a change in pull request #10196: [FLINK-14789] [table-planner-blink]
extends max/min type in ColumnStats from Number to Comparable
URL: https://github.com/apache/flink/pull/10196#discussion_r346840556
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdColumnInterval.scala
 ##########
 @@ -66,12 +66,20 @@ class FlinkRelMdColumnInterval private extends MetadataHandler[ColumnInterval]
{
     val statistic = relOptTable.getFlinkStatistic
     val colStats = statistic.getColumnStats(fieldName)
     if (colStats != null) {
-      val min = colStats.getMinValue
-      val max = colStats.getMaxValue
-      if (min == null && max == null) {
-        null
-      } else {
+      val minValue = colStats.getMinValue
+      val maxValue = colStats.getMaxValue
+      val min = colStats.getMin
+      val max = colStats.getMax
+
+      Preconditions.checkArgument(
+        (minValue == null && maxValue == null) || (max == null && min ==
null))
 
 Review comment:
   Why checking this? I think it's valid to set only max value or min 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message