MaxGekk commented on code in PR #47941:
URL: https://github.com/apache/spark/pull/47941#discussion_r1739994194
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/StringExpressionsSuite.scala:
##########
@@ -467,6 +467,12 @@ class StringExpressionsSuite extends SparkFunSuite with
ExpressionEvalHelper {
val b = $"b".binary.at(0)
val bytes = Array[Byte](1, 2, 3, 4)
+ assert(!Base64(Literal(bytes)).nullable)
+ assert(Base64(Literal.create(null, BinaryType)).nullable)
+ assert(!UnBase64(Literal("AQIDBA==")).nullable)
+ assert(UnBase64(Literal.create(null, StringType)).nullable)
Review Comment:
Let's add an check when you pass not-NULL expr but mark it as a `nullable`:
```scala
assert(Base64(Literal(bytes).castNullable()).nullable)
```
--
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]