Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-22179

percentile_approx should choose the first element if it already reaches the percentage

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.3.0
    • None
    • SQL
    • None

    Description

      percentile_approx should choose the first element if it already reaches the percentage.
      For example, given input data 1 to 10, if a user queries 10% (or even less) percentile, it should return 1 (instead of 2), because the first value 1 already reaches 10%. Currently it returns a wrong answer: 2.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ZenWzh Zhenhua Wang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: