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

Dataframe count is zero after 'except' operation

    XMLWordPrintableJSON

    Details

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

      Description

      Data frame count after the except operation is always returning zero even when there is data in the resulting data frame.

      scala> val df1 = sc.parallelize(1 to 5).toDF("V1")
      df1: org.apache.spark.sql.DataFrame = [V1: int]
      
      scala> val df2 = sc.parallelize(2 to 5).toDF("V2")
      df2: org.apache.spark.sql.DataFrame = [V2: int]
      
      scala> df1.except(df2).show()
      +---+
      | V1|
      +---+
      |  1|
      +---+
      
      
      scala> df1.except(df2).count()
      res4: Long = 0
      
      scala> df1.except(df2).rdd.count()
      res5: Long = 1
      
      scala>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                skolli Satish Kolli
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: