You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Gabriel39 (via GitHub)" <gi...@apache.org> on 2023/05/25 03:27:14 UTC

[GitHub] [doris] Gabriel39 commented on a diff in pull request #19811: [feature](decimal)support cast rounding half up and div precision increment in decimalv3.

Gabriel39 commented on code in PR #19811:
URL: https://github.com/apache/doris/pull/19811#discussion_r1204953331


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Divide.java:
##########
@@ -62,14 +63,15 @@ public DataType getDataType() throws UnboundException {
     @Override
     public DecimalV3Type getDataTypeForDecimalV3(DecimalV3Type t1, DecimalV3Type t2) {
         int retPercision = t1.getPrecision() + t2.getScale();
-        int retScale = t1.getScale();
+        int retScale = t1.getScale() + t2.getScale()
+                + ConnectContext.get().getSessionVariable().getDivPrecisionIncrement();

Review Comment:
   We can't get `ConnectContext` for stream load task. Please put this variable in `fe.conf`



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

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


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