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

select($"column1", explode($"column2")) is extremely slow

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0
    • Component/s: SQL
    • Labels:
      None

      Description

      Using a Dataset containing 10.000 rows, each containing null and an array of 5.000 Ints, I observe the following performance (in local mode):

      scala> time(ds.select(explode($"value")).sample(false, 0.0000001, 1).collect)
      1.219052 seconds                                                                
      res9: Array[org.apache.spark.sql.Row] = Array([3761], [3766], [3196])
      
      scala> time(ds.select($"dummy", explode($"value")).sample(false, 0.0000001, 1).collect)
      20.219447 seconds                                                               
      res5: Array[org.apache.spark.sql.Row] = Array([null,3761], [null,3766], [null,3196])
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hvanhovell Herman van Hövell
                Reporter:
                TPolzer TobiasP
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: