You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/04/01 11:17:44 UTC

[GitHub] [ignite] ivandasch commented on a change in pull request #9927: IGNITE-16711 SQL Calcite: Fix numeric dynamic parameters conversation

ivandasch commented on a change in pull request #9927:
URL: https://github.com/apache/ignite/pull/9927#discussion_r840485256



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/util/TypeUtils.java
##########
@@ -273,6 +286,26 @@ private static boolean hasConvertableFields(RelDataType resultType) {
             .anyMatch(TypeUtils::isConvertableType);
     }
 
+    /** */
+    public static boolean hasPrecesion(RelDataType type) {
+        // Special case for DECIMAL type without precesion and scale specified.
+        if (type.getSqlTypeName() == SqlTypeName.DECIMAL &&
+            type.getPrecision() == IgniteTypeSystem.INSTANCE.getDefaultPrecision(SqlTypeName.DECIMAL))
+            return false;
+
+        return type.getPrecision() != RelDataType.PRECISION_NOT_SPECIFIED;
+    }
+
+    /** */
+    public static boolean hasSale(RelDataType type) {

Review comment:
       typo -- should be `hasScale`




-- 
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-unsubscribe@ignite.apache.org

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