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

Use quoted attribute names if needed in pushed ORC predicates

    Details

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

      Description

      This issue aims to fix an ORC performance regression at Spark 2.4.0 RCs from Spark 2.3.2. For column names with `.`, the pushed predicates are ignored.

      Test Data

      scala> val df = spark.range(Int.MaxValue).sample(0.2).toDF("col.with.dot")
      scala> df.write.mode("overwrite").orc("/tmp/orc")
      

      Spark 2.3.2

      scala> spark.sql("set spark.sql.orc.impl=native")
      scala> spark.sql("set spark.sql.orc.filterPushdown=true")
      scala> spark.time(spark.read.orc("/tmp/orc").where("`col.with.dot` < 10").show)
      +------------+
      |col.with.dot|
      +------------+
      |           1|
      |           8|
      +------------+
      
      Time taken: 1486 ms
      
      scala> spark.time(spark.read.orc("/tmp/orc").where("`col.with.dot` < 10").show)
      +------------+
      |col.with.dot|
      +------------+
      |           1|
      |           8|
      +------------+
      
      Time taken: 163 ms
      

      Spark 2.4.0 RC2

      scala> spark.time(spark.read.orc("/tmp/orc").where("`col.with.dot` < 10").show)
      +------------+
      |col.with.dot|
      +------------+
      |           1|
      |           8|
      +------------+
      
      Time taken: 4087 ms
      
      scala> spark.time(spark.read.orc("/tmp/orc").where("`col.with.dot` < 10").show)
      +------------+
      |col.with.dot|
      +------------+
      |           1|
      |           8|
      +------------+
      
      Time taken: 1998 ms
      

        Attachments

          Activity

            People

            • Assignee:
              dongjoon Dongjoon Hyun
              Reporter:
              dongjoon Dongjoon Hyun
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: