Vladsz83 commented on code in PR #9923:
URL: https://github.com/apache/ignite/pull/9923#discussion_r843809406


##########
modules/calcite/src/main/codegen/config.fmpp:
##########
@@ -68,6 +68,7 @@ data: {
       "ASYNC"
       "QUERY"
       "UUID"
+      "OTHER"

Review Comment:
   Fixed



##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/type/IgniteTypeFactory.java:
##########
@@ -266,22 +266,36 @@ else if (type instanceof UuidType)
                 return 
createTypeWithNullability(createSqlIntervalType(INTERVAL_QUALIFIER_DAY_TIME), 
true);
             else if (clazz == Period.class)
                 return 
createTypeWithNullability(createSqlIntervalType(INTERVAL_QUALIFIER_YEAR_MONTH), 
true);
-            else if (clazz == UUID.class)
-                return createTypeWithNullability(createUuidType(), true);
+            else {
+                RelDataType relType = createCustomType(clazz);
+
+                if (relType != null)
+                    return relType;
+            }
         }
 
         return super.toSql(type);
     }
 
-    /** @return UUID SQL type. */
-    public RelDataType createUuidType() {
-        return canonize(new UuidType(true));
+    /** @return Custom type by storage type. {@code Null} if custom type not 
found. */
+    public RelDataType createCustomType(Type type) {
+        return createCustomType(type, true);
+    }
+
+    /** @return Nullable custom type by storage type. {@code Null} if custom 
type not found. */
+    public RelDataType createCustomType(Type type, boolean nullable) {
+        if (UUID.class == type)
+            return new UuidType(nullable);
+        else if (Object.class == type)
+            return new OtherType(nullable);

Review Comment:
   Fixed



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