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

Incorrect Literal Casting of DecimalType in OrcFilters

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.3.4, 2.4.1, 3.0.0
    • Component/s: SQL
    • Labels:

      Description

      DecimalType Literal should not be casted to Long.

      eg. For `df.filter("x < 3.14")`, assuming df (x in DecimalType) reads from a ORC table and uses the native ORC reader with predicate push down enabled, we will push down the `x < 3.14` predicate to the ORC reader via a SearchArgument.

      OrcFilters will construct the SearchArgument, but not handle the DecimalType correctly.

      The previous impl will construct `x < 3` from `x < 3.14`.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sadhen Darcy Shen
                Reporter:
                sadhen Darcy Shen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: