cloud-fan commented on a change in pull request #35924:
URL: https://github.com/apache/spark/pull/35924#discussion_r832146269
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
##########
@@ -2575,6 +2575,22 @@ class AdaptiveQueryExecSuite
assert(findTopLevelAggregate(adaptive5).size == 4)
}
}
+
+ test("SPARK-38578: Avoid unnecessary sort in FileFormatWriter if user has
specified sort") {
+ Seq(
+ ("key", "key, value", false),
+ ("key as x", "key, value", false),
+ ("key", "key", true),
+ ("key, value", "key", true)
+ ).foreach { case (project, sort, required) =>
+ val (origin, adaptive) = runAdaptiveAndVerifyResult(
+ s"""
+ |SELECT $project FROM testdata where key < 0 ORDER BY $sort
Review comment:
this is not even a table insertion, how do we define unnecessary sort?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]