Ruifeng Zheng created SPARK-58916:
-------------------------------------

             Summary: Handle infinite relativeError in approxQuantile
                 Key: SPARK-58916
                 URL: https://issues.apache.org/jira/browse/SPARK-58916
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 5.0.0
            Reporter: Ruifeng Zheng


DataFrameStatFunctions.approxQuantile derives approx_percentile accuracy from 
relativeError. Double.PositiveInfinity passes the existing non-negative 
relative-error validation, but ceil(1.0 / relativeError) produces accuracy 0, 
which approx_percentile rejects. Clamp the derived accuracy to at least 1. See 
PR: https://github.com/apache/spark/pull/58173



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to