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

The head() implementation of dataframe is very slow

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.1, 1.5.0
    • 1.5.1, 1.6.0
    • PySpark

    Description

      df=sqlContext.read.parquet("someparquetfiles")
      df.head()
      

      The above lines take over 15 minutes. It seems the dataframe requires 3 stages to return the first row. It reads all data (which is about 1 billion rows) and run Limit twice. The take(1) implementation in the RDD performs much better.

      Attachments

        Activity

          People

            rxin Reynold Xin
            superwai Jerry Lam
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: