This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new 6f1216516f [1.2](pick) Fix decimal type (#23691)
6f1216516f is described below

commit 6f1216516f7ae9a12b307ce639d87634da979bb1
Author: Gabriel <gabrielleeb...@gmail.com>
AuthorDate: Thu Aug 31 15:46:30 2023 +0800

    [1.2](pick) Fix decimal type (#23691)
---
 .../src/main/java/org/apache/doris/catalog/ScalarType.java        | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-common/src/main/java/org/apache/doris/catalog/ScalarType.java 
b/fe/fe-common/src/main/java/org/apache/doris/catalog/ScalarType.java
index 4fc74f3cb9..bad99d09fd 100644
--- a/fe/fe-common/src/main/java/org/apache/doris/catalog/ScalarType.java
+++ b/fe/fe-common/src/main/java/org/apache/doris/catalog/ScalarType.java
@@ -1020,8 +1020,12 @@ public class ScalarType extends Type {
             return t1.isDecimalV2() ? t1 : t2;
         }
 
-        if ((t1.isDecimalV3() && t2.isFixedPointType()) || (t2.isDecimalV3() 
&& t1.isFixedPointType())) {
-            return t1.isDecimalV3() ? t1 : t2;
+        if (t1.isDecimalV3() || t2.isDecimalV3()) {
+            if (t1.isFloatingPointType() || t2.isFloatingPointType()) {
+                return t1.isFloatingPointType() ? t1 : t2;
+            } else if (t1.isBoolean() || t2.isBoolean()) {
+                return t1.isDecimalV3() ? t1 : t2;
+            }
         }
 
         if (t1.isDecimalV3() && t2.isDecimalV3()) {


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

Reply via email to