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 2021/05/27 05:50:01 UTC
[GitHub] [spark] dgd-contributor commented on a change in pull request #32684: [SPARK-33428][SQL] Match the behavior of conv function to MySQL's
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org