You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by wzhfy <gi...@git.apache.org> on 2017/12/01 01:25:43 UTC

[GitHub] spark pull request #19783: [SPARK-21322][SQL] support histogram in filter ca...

Github user wzhfy commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19783#discussion_r154248457
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/EstimationUtils.scala ---
    @@ -114,4 +114,197 @@ object EstimationUtils {
         }
       }
     
    +  /**
    +   * Returns the number of the first bin into which a column values falls for a specified
    +   * numeric equi-height histogram.
    +   *
    +   * @param value a literal value of a column
    +   * @param histogram a numeric equi-height histogram
    +   * @return the number of the first bin into which a column values falls.
    +   */
    +
    +  def findFirstBinForValue(value: Double, histogram: Histogram): Int = {
    +    var binId = 0
    --- End diff --
    
    If a user changes the data, statistics will be removed, or re-collected (only size currently), Spark already implements this.


---

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