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

    https://github.com/apache/spark/pull/18740#discussion_r129911780
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala 
---
    @@ -1304,6 +1304,15 @@ class DatasetSuite extends QueryTest with 
SharedSQLContext {
           assert(rlike3.count() == 0)
         }
       }
    +
    +  test("SPARK-21538: Attribute resolution inconsistency in Dataset API") {
    +    val df = spark.range(1).withColumnRenamed("id", "x")
    +    checkAnswer(df.sort(col("id")), df.sort("id"))
    +    checkAnswer(df.sort($"id"), df.sort("id"))
    +    checkAnswer(df.sort('id), df.sort("id"))
    +    checkAnswer(df.orderBy('id), df.sort("id"))
    +    checkAnswer(df.orderBy("id"), df.sort("id"))
    --- End diff --
    
    Indeed, looks much better. I appreciate the explanation and will take this 
into account in the future. I will update the test in a minute, thanks


---
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