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


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/ReflectiveCallNotNullImplementor.java:
##########
@@ -66,6 +68,17 @@ public ReflectiveCallNotNullImplementor(Method method) {
 
             callExpr = Expressions.call(target, method, translatedOperands);
         }
+
+        if (TypeUtils.isConvertableType(method.getReturnType())) {

Review Comment:
   Try to fix it.



##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/TableFunctionScan.java:
##########
@@ -58,14 +65,19 @@ private Row convertToRow(Object rowContainer) {
             throw new IgniteSQLException("Unable to process table function 
data: row type is neither Collection or Object[].");
 
         Object[] rowArr = rowContainer.getClass() == Object[].class
-            ? (Object[])rowContainer
+            ? ((Object[])rowContainer).clone()
             : ((Collection<?>)rowContainer).toArray();
 
         if (rowArr.length != rowType.getFieldCount()) {
             throw new IgniteSQLException("Unable to process table function 
data: row length [" + rowArr.length
                 + "] doesn't match defined columns number [" + 
rowType.getFieldCount() + "].");
         }
 
+        for (int i = 0; i < rowArr.length; i++) {
+            if (!(rowType.getFieldList().get(i).getType() instanceof 
OtherType))
+                rowArr[i] = TypeUtils.toInternal(ctx, rowArr[i]);

Review Comment:
   Try to fix 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