zoudan commented on code in PR #3221:
URL: https://github.com/apache/calcite/pull/3221#discussion_r1220711542
##########
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java:
##########
@@ -924,6 +924,21 @@ private static RelDataType
arrayReturnType(SqlOperatorBinding opBinding) {
OperandTypes.STRING.or(OperandTypes.BINARY),
SqlFunctionCategory.STRING);
+ @LibraryOperator(libraries = {BIG_QUERY})
+ public static final SqlFunction FROM_BASE32 =
+ SqlBasicFunction.create("FROM_BASE32",
+ ReturnTypes.explicit(SqlTypeName.VARBINARY)
+ .andThen(SqlTypeTransforms.TO_NULLABLE),
+ OperandTypes.STRING, SqlFunctionCategory.STRING);
+
+ @LibraryOperator(libraries = {BIG_QUERY})
+ public static final SqlFunction TO_BASE32 =
+ SqlBasicFunction.create("TO_BASE32",
+ ReturnTypes.explicit(SqlTypeName.VARCHAR)
Review Comment:
Good idea, and I have added in
[CALCITE-5728](https://github.com/apache/calcite/pull/3237/files), maybe I
could rebase and modify it after
[CALCITE-5728](https://github.com/apache/calcite/pull/3237/files) is merged
--
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]