ygerzhedovich commented on code in PR #3869:
URL: https://github.com/apache/ignite-3/pull/3869#discussion_r1627516760


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/type/IgniteTypeSystem.java:
##########
@@ -61,19 +61,19 @@ public int getMaxPrecision(SqlTypeName typeName) {
     @Override
     public int getDefaultPrecision(SqlTypeName typeName) {
         switch (typeName) {
-            case VARCHAR:
-            case VARBINARY:
-                return 1;
             case TIMESTAMP: // DATETIME
             case TIMESTAMP_WITH_LOCAL_TIME_ZONE: // TIMESTAMP
                 // SQL`16 part 2 section 6.1 syntax rule 36
                 return 6;
-            // FLOAT is an alias for REAL, When choosing between a real and a 
float, let's always choose a real.
-            // getDefaultPrecision for types that do not have precision only 
affects results of TypeFactory::leastRestrictive
-            case REAL:
-                return 8;
             case FLOAT:
-                return 7;
+                // Although FLOAT is an alias for REAL, we cannot use the same 
precision for them, w/o making
+                // results of TypeFactory::LeastRestrictiveType() 
non-deterministic. 
+                // We need to change the FLOAT precision, because by default 
calcite uses the precision for FLOAT and DOUBLE.

Review Comment:
   do you mean 'the same'?



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