lowka commented on code in PR #1777:
URL: https://github.com/apache/ignite-3/pull/1777#discussion_r1137095158


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/type/IgniteTypeFactory.java:
##########
@@ -375,28 +373,31 @@ public Type getResultClass(RelDataType type) {
             assert resultType instanceof BasicSqlType : "leastRestrictive is 
expected to return a new instance of a type: " + resultType;
 
             IgniteCustomType firstCustomType = null;
-            SqlTypeFamily sqlTypeFamily = null;
+            boolean hasAnyType = false;
 
             for (var type : types) {
                 if (type instanceof IgniteCustomType) {
-                    var customType = (IgniteCustomType) type;
-
                     if (firstCustomType == null) {
                         firstCustomType = (IgniteCustomType) type;
-                    } else if 
(!Objects.equals(firstCustomType.getCustomTypeName(), 
customType.getCustomTypeName())) {
-                        // IgniteCustomType: Conversion between custom data 
types is not supported.
-                        return null;
+                    } else {
+                        IgniteCustomType customType = (IgniteCustomType) type;
+                        if 
(!Objects.equals(firstCustomType.getCustomTypeName(), 
customType.getCustomTypeName())) {
+                            // IgniteCustomType: Conversion between custom 
data types is not supported.
+                            return null;
+                        } else {
+                            return firstCustomType;

Review Comment:
   Thanks. 



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