AMashenkov commented on code in PR #2786:
URL: https://github.com/apache/ignite-3/pull/2786#discussion_r1381451344


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/Commons.java:
##########
@@ -861,4 +864,46 @@ public static SqlQueryType getQueryType(SqlNode sqlNode) {
                 return null;
         }
     }
+
+    /** Returns the minimum unscaled value of a numeric type.
+     *
+     * @param type a numeric type
+     */
+    public static long getMinValue(RelDataType type) {
+        SqlTypeName typeName = type.getSqlTypeName();
+        switch (typeName) {
+            case TINYINT:
+                return Byte.MIN_VALUE;
+            case SMALLINT:
+                return Short.MIN_VALUE;
+            case INTEGER:
+                return Integer.MIN_VALUE;
+            case BIGINT:

Review Comment:
   Is BIGINT scaled? or `Long.MIN_VALUE` is missed here?
   



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