pan3793 commented on PR #37483:
URL: https://github.com/apache/spark/pull/37483#issuecomment-1559306005

   @cloud-fan, sorry my previous comment is not correct.
   
   After SPARK-37820, `select unbase64("abcs==")`(malformed input) always 
throws an exception, this PR does not help in that case, it only improves the 
error message for `to_binary()`.
   
   So, `unbase64()`'s behavior for malformed input changes silently after 
SPARK-37820:
   - before: return a malformed decode value (maybe a best-effort parsed 
result, not sure)
   - after: throw an exception
   
   And there is no way to restore the previous behavior. To tolerate the 
malformed input, the user should migrate "unbase64(<input>)" to 
`try_to_binary(<input>, 'base64')` to get NULL instead of interrupting by 
exception. 
   
   This is kind of an awkward situation.


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