You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "tkalkirill (via GitHub)" <gi...@apache.org> on 2026/10/01 09:12:01 UTC

Re: [PR] IGNITE-29031 SQL Calcite: Support byte[] in UDF and UDTF parameters and results [ignite]

tkalkirill commented on code in PR #13543:
URL: https://github.com/apache/ignite/pull/13543#discussion_r4153740965


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/ConverterUtils.java:
##########
@@ -230,6 +276,12 @@ public static Expression convert(Expression operand, Type fromType, Type toType)
         if (toType == BigDecimal.class)
             throw new AssertionError("For conversion to decimal, ConverterUtils#convertToDecimal method should be used instead.");
 
+        if (fromType == byte[].class && toType == ByteString.class)
+            return Expressions.call(BuiltInMethod.BYTE_ARRAY_TO_BYTE_STRING.method, operand);
+
+        if (fromType == ByteString.class && toType == byte[].class)
+            return Expressions.call(BuiltInMethod.BYTE_STRING_TO_BYTE_ARRAY.method, operand);

Review Comment:
   Add OperatorsExtensionIntegrationTest#testBinaryFunctionWithJavaReturnType and OperatorsExtensionIntegrationTest#testBinaryFunctionWithJavaReturnTypeDynamicParameters



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org