sarutak commented on a change in pull request #34593:
URL: https://github.com/apache/spark/pull/34593#discussion_r753910068



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/MathFunctionsSuite.scala
##########
@@ -319,6 +370,18 @@ class MathFunctionsSuite extends QueryTest with 
SharedSparkSession {
       df.withColumn("value_brounded", bround('value)),
       Seq(Row(BigDecimal("5.9"), BigDecimal("6")))
     )
+    checkAnswer(
+      df.withColumn("value_rounded", round('value, 0, "up")),
+      Seq(Row(BigDecimal("5.9"), BigDecimal("6")))
+    )
+    checkAnswer(
+      df.withColumn("value_brounded", round('value, 0, "down")),

Review comment:
       Hmm, there seems to be no standard / de-fact standard implementation of 
`round` which has the third argument.
   As you mention, SAP Hana and MS SQL Server allow the third argument for 
`round` but they are still ununiform.




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

Reply via email to