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


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/IgniteTableFunction.java:
##########
@@ -132,4 +145,43 @@ private static void raiseValidationError(Method method, 
String errPostfix) {
 
         throw new IgniteSQLException("Unable to create table function for 
method '" + mtdSign + "'. " + errPostfix);
     }
+
+    /** Returns function parameters represented as SQL types where required. */
+    private static List<FunctionParameter> sqlParameters(Method method, 
List<FunctionParameter> functionParameters) {
+        var res = new ArrayList<>(functionParameters);
+
+        for (int i = 0; i < method.getParameterTypes().length; i++) {
+            if (method.getParameterTypes()[i] == byte[].class)
+                res.set(i, sqlBinaryParameter(res.get(i)));
+        }
+
+        return Collections.unmodifiableList(res);
+    }
+
+    /** Prevents Calcite from evaluating binary literals while deriving a 
table function row type. */
+    private static FunctionParameter sqlBinaryParameter(FunctionParameter 
delegate) {

Review Comment:
   When testing with temporal types, it turned out that this is currently 
necessary and does not work without it.



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

Reply via email to