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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4ac460af286 [decimal](tests) add test case for least/greatest for 
decimalv3 type (#26930)
4ac460af286 is described below

commit 4ac460af286b4da11c274fcbbdbe05d76c74dc3c
Author: TengJianPing <[email protected]>
AuthorDate: Fri Nov 17 12:09:59 2023 +0800

    [decimal](tests) add test case for least/greatest for decimalv3 type 
(#26930)
---
 .../sql_functions/math_functions/test_least_greatest.out   |  7 +++++++
 .../math_functions/test_least_greatest.groovy              | 14 ++++++++++++++
 2 files changed, 21 insertions(+)

diff --git 
a/regression-test/data/query_p0/sql_functions/math_functions/test_least_greatest.out
 
b/regression-test/data/query_p0/sql_functions/math_functions/test_least_greatest.out
index 42cf997c6fe..54b6491ea07 100644
--- 
a/regression-test/data/query_p0/sql_functions/math_functions/test_least_greatest.out
+++ 
b/regression-test/data/query_p0/sql_functions/math_functions/test_least_greatest.out
@@ -323,3 +323,10 @@ zzz
 zzz
 zzz
 
+-- !decimalv3_scale0 --
+12.34
+34.45
+
+-- !decimalv3_scale1 --
+23.45
+45.56
diff --git 
a/regression-test/suites/query_p0/sql_functions/math_functions/test_least_greatest.groovy
 
b/regression-test/suites/query_p0/sql_functions/math_functions/test_least_greatest.groovy
index 5da23ccb25b..f8bee095142 100644
--- 
a/regression-test/suites/query_p0/sql_functions/math_functions/test_least_greatest.groovy
+++ 
b/regression-test/suites/query_p0/sql_functions/math_functions/test_least_greatest.groovy
@@ -116,6 +116,20 @@ suite("test_least_greatest") {
     qt_select "SELECT GREATEST('zzz', v5) FROM test_least_greatest order by k1"
 
     sql """ drop table if exists test_least_greatest; """
+
+    sql """ drop table if exists test_least_greatest2; """
+    sql """
+        CREATE TABLE `test_least_greatest2` (
+            id int,
+            name1 decimalv3(9,2),
+            name2 decimalv3(9,2)
+        ) DISTRIBUTED BY HASH(id) BUCKETS 1
+        PROPERTIES ( "replication_allocation" = "tag.location.default: 1");
+    """
+    sql """insert into test_least_greatest2 values(1, 12.34, 23.45), (2, 
34.45, 45.56);"""
+    sql "sync"
+    qt_decimalv3_scale0 " select least(name1, name2) from test_least_greatest2 
order by name1, name2;"
+    qt_decimalv3_scale1 " select greatest(name1, name2) from 
test_least_greatest2 order by name1, name2;"
 }
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to