You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/09/08 16:37:01 UTC

[GitHub] [doris] morrySnow commented on a diff in pull request #12482: [feature-wip](nereids) Cast children type of cmp expression to the common type

morrySnow commented on code in PR #12482:
URL: https://github.com/apache/doris/pull/12482#discussion_r966182730


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/TypeCoercionUtils.java:
##########
@@ -189,6 +192,8 @@ public static Optional<DataType> findTightestCommonType(DataType left, DataType
             }
         } else if (left instanceof CharacterType || right instanceof CharacterType) {
             tightestCommonType = StringType.INSTANCE;
+        } else if (left instanceof DecimalType && right instanceof IntegralType) {
+            tightestCommonType = new DecimalType(9, 0);

Review Comment:
   ```suggestion
               tightestCommonType = DecimalType.forType(right);
   ```



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