somu-imply commented on code in PR #14943:
URL: https://github.com/apache/druid/pull/14943#discussion_r1317647787
##########
processing/src/test/java/org/apache/druid/math/expr/FunctionTest.java:
##########
@@ -925,6 +925,15 @@ public void testRepeat()
assertExpr("repeat(nonexistent, 10)", null);
}
+ @Test
+ public void testDecodeBase64UTF()
+ {
+ assertExpr("decode_base64_utf8('aGVsbG8=')", "hello");
+
assertExpr("decode_base64_utf8('V2hlbiBhbiBvbmlvbiBpcyBjdXQsIGNlcnRhaW4gKGxhY2hyeW1hdG9yKSBjb21wb3VuZHMgYXJlIHJlbGVhc2VkIGNhdXNpbmcgdGhlIG5lcnZlcyBhcm91bmQgdGhlIGV5ZXMgKGxhY3JpbWFsIGdsYW5kcykgdG8gYmVjb21lIGlycml0YXRlZC4=')",
"When an onion is cut, certain (lachrymator) compounds are released causing
the nerves around the eyes (lacrimal glands) to become irritated.");
+ assertExpr("decode_base64_utf8('eyJ0ZXN0IjogMX0=')", "{\"test\": 1}");
+ assertExpr("decode_base64_utf8('')", "");
Review Comment:
nit. this can be null in SQL compatible mode
--
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]