mihailoale-db commented on code in PR #50069:
URL: https://github.com/apache/spark/pull/50069#discussion_r1970266534


##########
sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala:
##########
@@ -2721,6 +2721,18 @@ class DataFrameSuite extends QueryTest
       parameters = Map("name" -> ".whatever")
     )
   }
+
+  test("Nested order by") {
+    val df = sql("SELECT * FROM VALUES(1,2,3)")
+    checkAnswer(df.select("col1").orderBy("col2").orderBy("col3"), Row(1))
+  }
+
+  test("Column reference takes precedence over ALL keyword") {
+    val df1 = sql("select * from values(1,2,4) as t1(a, b, all1)")
+    val df2 = sql("select * from values(1,3,2) as t2(a, b, all)")
+    val df3 = df1.join(df2, df1("a") === df2("a"))
+    checkAnswer(df3.select(df1("all").as("all1")).orderBy("all"), Row(2))

Review Comment:
   No need for that. it is obvious here that we order by column instead of 
`all` keyword. adding more rows would be redundant.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to