cambyzju commented on code in PR #9582:
URL: https://github.com/apache/incubator-doris/pull/9582#discussion_r875832952


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/TypeDef.java:
##########
@@ -159,15 +159,28 @@ private void analyzeScalarType(ScalarType scalarType)
       case DECIMALV2: {
         int precision = scalarType.decimalPrecision();
         int scale = scalarType.decimalScale();
-        // precision: [1, 27]
-        if (precision < 1 || precision > 27) {
-          throw new AnalysisException("Precision of decimal must between 1 and 
27."
-                  + " Precision was set to: " + precision + ".");
-        }
-        // scale: [0, 9]
-        if (scale < 0 || scale > 9) {
-          throw new AnalysisException("Scale of decimal must between 0 and 9."
-                  + " Scale was set to: " + scale + ".");
+        if (Config.enable_storage_decimalv3) {
+            // precision: [1, 38]
+            if (precision < 1 || precision > 38) {

Review Comment:
   it is better replace 38 with MAX_DECIMAL128_PRECISION.



-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to