This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a commit to branch ignite-27390
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit a75c65bc43374c1f46c4e92d20abdf9481b4127a
Author: AMashenkov <[email protected]>
AuthorDate: Fri Dec 26 14:40:35 2025 +0300

    Minor
---
 .../apache/ignite/internal/sql/engine/util/RexUtils.java  | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git 
a/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/RexUtils.java
 
b/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/RexUtils.java
index 54001d42ebe..f30e88a76ed 100644
--- 
a/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/RexUtils.java
+++ 
b/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/RexUtils.java
@@ -1458,23 +1458,16 @@ public class RexUtils {
             return false;
         }
 
-        if (SqlTypeUtil.isExactNumeric(source) && target.getSqlTypeName() == 
SqlTypeName.DECIMAL) {
-            int tp = target.getPrecision();
-            int ts = target.getScale();
-            int sp = source.getPrecision();
-            int ss = source.getScale();
-
-            return ts >= ss && (tp - ts) >= (sp - ss);
-        }
-
+        // Extended support for CHARACTER with PRECISION_NOT_SPECIFIED
         if 
(SqlTypeFamily.CHARACTER.getTypeNames().contains(source.getSqlTypeName())
                 && 
SqlTypeFamily.CHARACTER.getTypeNames().contains(target.getSqlTypeName())) {
             return target.getSqlTypeName().compareTo(source.getSqlTypeName()) 
>= 0
                     && (source.getPrecision() <= target.getPrecision() || 
target.getPrecision() == RelDataType.PRECISION_NOT_SPECIFIED);
         }
 
-        if (source.getSqlTypeName() == target.getSqlTypeName() && 
SqlTypeUtil.isDatetime(source)) {
-            return source.getPrecision() <= target.getPrecision();
+        // Add support for temporal types
+        if (source.getSqlTypeName() == target.getSqlTypeName() && 
SqlTypeName.DATETIME_TYPES.contains(source.getSqlTypeName())) {
+            return (source.getPrecision() <= target.getPrecision() || 
target.getPrecision() == RelDataType.PRECISION_NOT_SPECIFIED);
         }
 
         return RexUtil.isLosslessCast(source, target);

Reply via email to