Skip to content

Commit

Permalink
[enhancement](regression-test) add test for test_avg (apache#25892)
Browse files Browse the repository at this point in the history
  • Loading branch information
keanji-x authored Oct 26, 2023
1 parent d6c64d3 commit bc60685
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 3 deletions.
105 changes: 103 additions & 2 deletions regression-test/data/correctness_p0/test_avg.out
Original file line number Diff line number Diff line change
@@ -1,10 +1,111 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !count --
99
-- !select --
100000000000001
100000000000002
100000000000003
100000000000004
100000000000005
100000000000006
100000000000007
100000000000008
100000000000009
1000000000000010
1000000000000011
1000000000000012
1000000000000013
1000000000000014
1000000000000015
1000000000000016
1000000000000017
1000000000000018
1000000000000019
1000000000000020
1000000000000021
1000000000000022
1000000000000023
1000000000000024
1000000000000025
1000000000000026
1000000000000027
1000000000000028
1000000000000029
1000000000000030
1000000000000031
1000000000000032
1000000000000033
1000000000000034
1000000000000035
1000000000000036
1000000000000037
1000000000000038
1000000000000039
1000000000000040
1000000000000041
1000000000000042
1000000000000043
1000000000000044
1000000000000045
1000000000000046
1000000000000047
1000000000000048
1000000000000049
1000000000000050
1000000000000051
1000000000000052
1000000000000053
1000000000000054
1000000000000055
1000000000000056
1000000000000057
1000000000000058
1000000000000059
1000000000000060
1000000000000061
1000000000000062
1000000000000063
1000000000000064
1000000000000065
1000000000000066
1000000000000067
1000000000000068
1000000000000069
1000000000000070
1000000000000071
1000000000000072
1000000000000073
1000000000000074
1000000000000075
1000000000000076
1000000000000077
1000000000000078
1000000000000079
1000000000000080
1000000000000081
1000000000000082
1000000000000083
1000000000000084
1000000000000085
1000000000000086
1000000000000087
1000000000000088
1000000000000089
1000000000000090
1000000000000091
1000000000000092
1000000000000093
1000000000000094
1000000000000095
1000000000000096
1000000000000097
1000000000000098
1000000000000099

-- !sum --
90900000000004950

-- !count --
99

-- !avg --
9.181818181818681E14

Expand Down
3 changes: 2 additions & 1 deletion regression-test/suites/correctness_p0/test_avg.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ suite("test_avg") {
sql """ INSERT INTO ${tableName} values (10000000000000${i}) """
}
sql "sync"
qt_count """ SELECT COUNT(c_bigint) FROM ${tableName} """
qt_select """select c_bigint from ${tableName} order by c_bigint"""
qt_sum """ SELECT SUM(c_bigint) FROM ${tableName} """
qt_count """ SELECT COUNT(c_bigint) FROM ${tableName} """
qt_avg """ SELECT AVG(c_bigint) FROM ${tableName} """
sql""" DROP TABLE IF EXISTS ${tableName} """

Expand Down

0 comments on commit bc60685

Please sign in to comment.