korlov42 commented on code in PR #916:
URL: https://github.com/apache/ignite-3/pull/916#discussion_r914494953


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/type/IgniteTypeSystem.java:
##########
@@ -44,29 +45,69 @@ public int getMaxNumericPrecision() {
         return Short.MAX_VALUE;
     }
 
+    /** {@inheritDoc} */
+    @Override
+    public int getMaxPrecision(SqlTypeName typeName) {
+        switch (typeName) {
+            case TIME:
+            case TIME_WITH_LOCAL_TIME_ZONE:
+            case TIMESTAMP:
+            case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
+                return TemporalColumnType.MAX_TIME_PRECISION;
+            default:
+                return super.getMaxPrecision(typeName);
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int getDefaultPrecision(SqlTypeName typeName) {
+        switch (typeName) {
+            case TIMESTAMP: // DATETIME
+                return TemporalColumnType.DEFAULT_TIME_PRECISION;

Review Comment:
   Could you please explain why have you decided to use _time precision_ here? 
In my opinion, we should use _timestamp precision_ for both TIMESTAMP and 
TIMESTAMP W/ TIMEZONE types



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