[Fix](regression-test)fix some unfixed-answer test #17408

This commit is contained in:
mch_ucchi
2023-03-04 12:13:41 +08:00
committed by GitHub
parent 9aecd517b0
commit 9f7386243f
2 changed files with 2 additions and 75 deletions

View File

@ -1,73 +0,0 @@
DROP TABLE IF EXISTS running_difference_test;
CREATE TABLE running_difference_test (
`id` int NOT NULL COMMENT 'id' ,
`day` date COMMENT 'day',
`time_val` datetime COMMENT 'time_val',
`doublenum` double NULL COMMENT 'doublenum'
)
DUPLICATE KEY(id)
DISTRIBUTED BY HASH(id) BUCKETS 3
PROPERTIES (
"replication_num" = "1"
);
INSERT into running_difference_test (id,day, time_val,doublenum) values ('1', '2022-10-28', '2022-03-12 10:41:00', null),
('2','2022-10-27', '2022-03-12 10:41:02', 2.6),
('3','2022-10-28', '2022-03-12 10:41:03', 2.5),
('4','2022-9-29', '2022-03-12 10:41:03', null),
('5','2022-10-31', '2022-03-12 10:42:01', 3.3),
('6', '2022-11-08', '2022-03-12 11:05:04', 4.7);
SELECT * from running_difference_test ORDER BY id ASC;
SELECT
id,
running_difference(id) AS delta
FROM
(
SELECT
id,
day,
time_val,
doublenum
FROM running_difference_test
)as runningDifference ORDER BY id ASC;
SELECT
day,
running_difference(day) AS delta
FROM
(
SELECT
id,
day,
time_val,
doublenum
FROM running_difference_test
)as runningDifference ORDER BY id ASC;
SELECT
time_val,
running_difference(time_val) AS delta
FROM
(
SELECT
id,
day,
time_val,
doublenum
FROM running_difference_test
)as runningDifference ORDER BY id ASC;
SELECT
doublenum,
running_difference(doublenum) AS delta
FROM
(
SELECT
id,
day,
time_val,
doublenum
FROM running_difference_test
)as runningDifference ORDER BY id ASC;

View File

@ -35,7 +35,7 @@ suite("explode_json_array") {
(200, 'Mary', NULL, 1, 'Street 2'),
(300, 'Mike', 80, 3, 'Street 3'),
(400, 'Dan', 50, 4, 'Street 4') """
qt_explode_json_array7 """ SELECT * FROM ${tableName}
qt_explode_json_array7 """ SELECT id, name, age, class, address, d_age, c_age FROM ${tableName}
LATERAL VIEW EXPLODE_JSON_ARRAY_INT('[30, 60]') t1 as c_age
LATERAL VIEW EXPLODE_JSON_ARRAY_INT('[40, 80]') t2 as d_age
ORDER BY id, c_age, d_age """
@ -49,7 +49,7 @@ suite("explode_json_array") {
LATERAL VIEW EXPLODE_JSON_ARRAY_INT('[]') t1 AS c_age
ORDER BY id, c_age """
qt_explode_json_array10 """ SELECT * FROM ${tableName}
qt_explode_json_array10 """ SELECT id, name, age, class, address, d, c FROM ${tableName}
LATERAL VIEW EXPLODE_JSON_ARRAY_STRING('[1, "b", 3]') t1 as c
LATERAL VIEW EXPLODE_JSON_ARRAY_DOUBLE('[1.23, 22.214, 214.1]') t2 as d
ORDER BY id, c, d """