Vladsz83 commented on code in PR #9923:
URL: https://github.com/apache/ignite/pull/9923#discussion_r843026627
##########
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.getName());
+
+ 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 name or storeable class name. {@code Null} if
type not found. */
+ public RelDataType createCustomType(String typeName) {
+ return createCustomType(typeName, true);
+ }
+
+ /** @return Nullable custom type by name or storeable class name. {@code
Null} if type not found. */
+ public RelDataType createCustomType(String typeName, boolean nullable) {
Review Comment:
Changed to Type. Changed json contract in mapping. Think not an issue for
now.
--
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]