xtern commented on code in PR #4409:
URL: https://github.com/apache/ignite-3/pull/4409#discussion_r1773036132


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/IgniteTypeCoercion.java:
##########
@@ -789,7 +812,7 @@ private void validateOperand(SqlDynamicParam node, 
RelDataType targetType, SqlOp
         RelDataType paramType = validator.resolveDynamicParameterType(node, 
targetType);
 
         // TODO https://issues.apache.org/jira/browse/IGNITE-23060 This 
condition must be simplified.
-        boolean compatible = TypeUtils.typeFamiliesAreCompatible(typeFactory, 
targetType, paramType)
+        boolean compatible = typeFamiliesAreCompatible(typeFactory, 
targetType, paramType)
                 || 
IgniteCustomAssignmentsRules.instance().canApplyFrom(targetType.getSqlTypeName(),
 paramType.getSqlTypeName());

Review Comment:
   And the same thing here, it looks like we can drop the second part of the 
condition.
   ```
   || 
IgniteCustomAssignmentsRules.instance().canApplyFrom(targetType.getSqlTypeName(),
 paramType.getSqlTypeName());
   ```



##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/IgniteTypeCoercion.java:
##########
@@ -757,7 +780,7 @@ private void validateAssignment(SqlDynamicParam node, 
RelDataType targetType, Co
         RelDataType paramType = validator.resolveDynamicParameterType(node, 
targetType);
 
         // TODO https://issues.apache.org/jira/browse/IGNITE-23060 This 
condition must be simplified.
-        boolean compatible = TypeUtils.typeFamiliesAreCompatible(typeFactory, 
targetType, paramType)
+        boolean compatible = typeFamiliesAreCompatible(typeFactory, 
targetType, paramType)
                 || 
IgniteCustomAssignmentsRules.instance().canApplyFrom(targetType.getSqlTypeName(),
 paramType.getSqlTypeName());
 

Review Comment:
   Looks like we can drop second part of condition now
   ```
   || 
IgniteCustomAssignmentsRules.instance().canApplyFrom(targetType.getSqlTypeName(),
 paramType.getSqlTypeName());
   ````
   and remove TODO IGNITE-23060 ?



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