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

Use quoted attribute names if needed in pushed ORC predicates

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.4.0
    • 2.4.0, 3.0.0
    • SQL
    • 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

            dongjoon Dongjoon Hyun
            dongjoon Dongjoon Hyun
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: