spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cloud-fan <...@git.apache.org>
Subject [GitHub] spark pull request #19479: [SPARK-17074] [SQL] Generate equi-height histogra...
Date Mon, 30 Oct 2017 10:51:58 GMT
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19479#discussion_r147669325
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Statistics.scala
---
    @@ -177,13 +180,12 @@ object ColumnStat extends Logging {
           Some(ColumnStat(
             distinctCount = BigInt(map(KEY_DISTINCT_COUNT).toLong),
             // Note that flatMap(Option.apply) turns Option(null) into None.
    -        min = map.get(KEY_MIN_VALUE)
    -          .map(fromExternalString(_, field.name, field.dataType)).flatMap(Option.apply),
    -        max = map.get(KEY_MAX_VALUE)
    -          .map(fromExternalString(_, field.name, field.dataType)).flatMap(Option.apply),
    +        min = map.get(KEY_MIN_VALUE).map(fromString(_, field.name, field.dataType)),
    +        max = map.get(KEY_MAX_VALUE).map(fromString(_, field.name, field.dataType)),
    --- End diff --
    
    oh then the `KEY_MAX_VALUE` will not exist in the map..


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message