alex-plekhanov commented on code in PR #12148:
URL: https://github.com/apache/ignite/pull/12148#discussion_r2175374371


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/IgniteTypeCoercion.java:
##########
@@ -100,7 +100,7 @@ public IgniteTypeCoercion(RelDataTypeFactory typeFactory, 
SqlValidator validator
         int idx,
         RelDataType targetType
     ) {
-        if (targetType instanceof IgniteCustomType) {
+        if (targetType instanceof OtherType || targetType.getSqlTypeName() == 
SqlTypeName.UUID) {

Review Comment:
   I mean, after 1.41 UUID type is supported by castTo method and this branch 
only can contain condition for `OtherType`.



##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/IgniteRexBuilder.java:
##########
@@ -64,4 +66,19 @@ public IgniteRexBuilder(RelDataTypeFactory typeFactory) {
 
         return super.makeLiteral(o, type, typeName);
     }
+
+    /** {@inheritDoc} */
+    @Override public RexNode makeLiteral(@Nullable Object val, RelDataType 
type, boolean allowCast, boolean trim) {
+        if (val instanceof UUID)
+            val = val.toString();
+
+        if (type.getSqlTypeName() == SqlTypeName.UUID) {
+            if (val == null)
+                return 
makeNullLiteral(typeFactory.createSqlType(SqlTypeName.UUID));
+
+            return makeAbstractCast(type, makeLiteral(val, 
typeFactory.createSqlType(SqlTypeName.CHAR)), false);
+        }
+
+        return super.makeLiteral(val, type, allowCast, trim);
+    }

Review Comment:
   This comment still not fixed. 



##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/AggregatesIntegrationTest.java:
##########
@@ -116,6 +119,57 @@ public void testCountWithBackupsAndCacheModes() {
         assertQuery("select count(*) from person").returns(7L).check();
     }
 
+    /** TODO https://issues.apache.org/jira/browse/IGNITE-25765 : unignore 
after the fix. */
+    @Ignore

Review Comment:
   `@Ignore("https://issues.apache.org/jira/browse/IGNITE-25765";)` instead of 
TODO comment



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to