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

    https://github.com/apache/spark/pull/16971#discussion_r103872828
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproximatePercentile.scala
 ---
    @@ -245,7 +245,7 @@ object ApproximatePercentile {
             val result = new Array[Double](percentages.length)
             var i = 0
             while (i < percentages.length) {
    -          result(i) = summaries.query(percentages(i))
    +          result(i) = summaries.query(percentages(i)).get
    --- End diff --
    
    It looks like that it is impossible not return `None` here: Since 
`summaries.count != 0`, the `summaries.sampled` should not be empty, then 
`None` will not be returned. @thunterdb Is this correct?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to