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

sumApprox and meanApprox doctests are incorrect

    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.1, 1.4.0
    • Fix Version/s: 1.3.2, 1.4.1, 1.5.0
    • Component/s: PySpark
    • Labels:

      Description

      The doctests for sumApprox and meanApprox methods test against an upper bound but not a lower bound. If there was a regression in the underlying code that caused things to go wrong the doctest may not fail. For example if sumApprox returned 0 the doctest would return -1 which is less than 0.05. Solution is to use the abs() function to test that the approximate answer is within 5% of the exact answer.

        Attachments

          Activity

            People

            • Assignee:
              svt Scott Taylor
              Reporter:
              svt Scott Taylor
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: