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


##########
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:
   ```
           @QuerySqlFunction
           public static java.util.Date kill1() {
               return java.sql.Date.valueOf("2020-01-01");
           }
   ```
   
   and further call:
   
   ```
   assertQuery("SELECT kill1()")
               .resultSize(1)
               .check();
   ```
   
   will raise ClassCastException, while
   
   ```
           @QuerySqlFunction
           public static java.sql.Date kill2() {
               return java.sql.Date.valueOf("2020-01-01");
           }
   ``` 
   
   passes, wdyt ?



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