NarekDW commented on code in PR #40040:
URL: https://github.com/apache/spark/pull/40040#discussion_r1107365294


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MathExpressionsSuite.scala:
##########
@@ -158,45 +158,42 @@ class MathExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
   }
 
   test("conv") {
-    Seq(true, false).foreach { ansiEnabled =>
-      checkEvaluation(Conv(Literal("3"), Literal(10), Literal(2), 
ansiEnabled), "11")
-      checkEvaluation(Conv(Literal("-15"), Literal(10), Literal(-16), 
ansiEnabled), "-F")
-      checkEvaluation(
-        Conv(Literal("-15"), Literal(10), Literal(16), ansiEnabled), 
"FFFFFFFFFFFFFFF1")
-      checkEvaluation(Conv(Literal("big"), Literal(36), Literal(16), 
ansiEnabled), "3A48")
-      checkEvaluation(Conv(Literal.create(null, StringType), Literal(36), 
Literal(16), ansiEnabled),
-        null)
-      checkEvaluation(
-        Conv(Literal("3"), Literal.create(null, IntegerType), Literal(16), 
ansiEnabled), null)
-      checkEvaluation(
-        Conv(Literal("3"), Literal(16), Literal.create(null, IntegerType), 
ansiEnabled), null)
-      checkEvaluation(
-        Conv(Literal("1234"), Literal(10), Literal(37), ansiEnabled), null)
-      checkEvaluation(
-        Conv(Literal(""), Literal(10), Literal(16), ansiEnabled), null)
-
-      // If there is an invalid digit in the number, the longest valid prefix 
should be converted.
-      checkEvaluation(
-        Conv(Literal("11abc"), Literal(10), Literal(16), ansiEnabled), "B")

Review Comment:
   This behaviour is strange a bit, if it is required I'll add this 
functionality as well.



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