dgd-contributor commented on a change in pull request #32684:
URL: https://github.com/apache/spark/pull/32684#discussion_r640305599
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/MathFunctionsSuite.scala
##########
@@ -203,6 +203,13 @@ class MathFunctionsSuite extends QueryTest with
SharedSparkSession {
df.selectExpr("""conv("9223372036854775807", 36, -16)"""), Row("-1")) //
for overflow
}
+ test("SPARK-33428 conv function has different behavior with mySQL's conv
function") {
+ val df = Seq(("abc"), (" abc"), ("abc "), (" abc "),
+
("aaaaaaa0aaaaaaa0aaaaaaa0aaaaaaa0aaaaaaa0aaaaaaa0aaaaaaa0aaaaaaa0aaaaaaa0")).toDF("num")
+ checkAnswer(df.select(conv('num, 16, 10)),
+ Seq(Row("2748"), Row("2748"), Row("2748"), Row("2748"),
Row("18446744073709551615")))
+ }
Review comment:
OK, I will
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]