Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.9.1, 1.10.0
Description
`FROM_BASE64` should return String instead of byte[]
If ** we use FROM_BASE64 in sql, will result in a exception:
org.apache.flink.table.planner.codegen.CodeGenException: Incompatible types of expression and result type. Expression[GeneratedExpression(result$2,isNull$1,isNull$1 = false; result$2 = null; if (!isNull$1) { result$2 = org.apache.flink.table.runtime.functions.SqlFunctionUtils.fromBase64(((org.apache.flink.table.dataformat.BinaryString) str$0)); isNull$1 = (result$2 == null); } ,BYTES,None)] type is [BYTES], result type is [STRING NOT NULL]
Why ScalarFunctionsTest.testFromBase64 passed?
Because we assume the result should be string in ExpressionTestBase, then add a cast operator to the result of FROM_BASE64.
Attachments
Issue Links
- links to