GitHub user seancxmao opened a pull request: https://github.com/apache/spark/pull/23258
[SPARK-23375][SQL][FOLLOWUP][TEST] Test Sort metrics while Sort is missing ## What changes were proposed in this pull request? #20560/[SPARK-23375](https://issues.apache.org/jira/browse/SPARK-23375) introduced an optimizer rule to eliminate redundant Sort. For a test case named "Sort metrics" in `SQLMetricsSuite`, because range is already sorted, sort is removed by the `RemoveRedundantSorts`, which makes this test case meaningless. This PR modifies the query for testing Sort metrics and checks Sort exists in the plan. ## How was this patch tested? Modify the existing test case. You can merge this pull request into a Git repository by running: $ git pull https://github.com/seancxmao/spark sort-metrics Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/23258.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #23258 ---- commit 408ccf88325c23c6f2f6119cd6ba99c5056f95a2 Author: seancxmao <seancxmao@...> Date: 2018-12-08T03:58:21Z [SPARK-23375][SQL][FOLLOWUP][TEST] Test Sort metrics while Sort is missing ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org