You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/17 06:26:34 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #37540: [SPARK-40089][SQL ] Fix sorting for some Decimal types

cloud-fan commented on code in PR #37540:
URL: https://github.com/apache/spark/pull/37540#discussion_r947497593


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/SortSuite.scala:
##########
@@ -114,6 +114,22 @@ class SortSuite extends SparkPlanTest with SharedSparkSession {
       sortAnswers = false)
   }
 
+  test("SPARK-40089: decimal values sort correctly") {
+    val input = Seq(
+      BigDecimal("999999999999999999.50"),
+      BigDecimal("1.11"),
+      BigDecimal("999999999999999999.49")
+    )
+    spark.conf.set("spark.sql.shuffle.partitions", "1")

Review Comment:
   nit: use `withSQLConf` which will restore the conf value at the end.



-- 
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-unsubscribe@spark.apache.org

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


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