Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10388#discussion_r48199310
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/DataFrameNaFunctionsSuite.scala ---
    @@ -194,4 +194,45 @@ class DataFrameNaFunctionsSuite extends QueryTest with 
SharedSQLContext {
         assert(out1(4) === Row("Amy", null, null))
         assert(out1(5) === Row(null, null, null))
       }
    +
    +  test("Spark-12231: dropna with partitionBy and groupBy") {
    +    withTempPath { dir =>
    +      val df = sqlContext.range(10)
    +      val df1 = df.withColumn("a", $"id".cast("int"))
    +      df1.write.partitionBy("id").parquet(dir.getCanonicalPath)
    +      val df2 = sqlContext.read.parquet(dir.getCanonicalPath)
    +      val group = df2.na.drop().groupBy().count().collect()
    --- End diff --
    
    This file is not a great example of this, but we should always use 
`checkAnswer` in unit tests because it provides much better failure messages 
than the default ScalaTest asserts.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to