diff --git a/dbms/tests/queries/0_stateless/00927_asof_join_big.reference b/dbms/tests/queries/0_stateless/00927_asof_join_big.reference deleted file mode 100644 index 0d0ce1ea4e8..00000000000 --- a/dbms/tests/queries/0_stateless/00927_asof_join_big.reference +++ /dev/null @@ -1 +0,0 @@ -75000000 diff --git a/dbms/tests/queries/0_stateless/00927_asof_join_big.sql b/dbms/tests/queries/0_stateless/00927_asof_join_big.sql deleted file mode 100644 index 5e49460089d..00000000000 --- a/dbms/tests/queries/0_stateless/00927_asof_join_big.sql +++ /dev/null @@ -1,31 +0,0 @@ -USE test; - -DROP TABLE IF EXISTS tvs; -DROP TABLE IF EXISTS trades; -DROP TABLE IF EXISTS keys; -DROP TABLE IF EXISTS tv_times; -DROP TABLE IF EXISTS trade_times; - -CREATE TABLE keys(k UInt32) ENGINE = MergeTree() ORDER BY k; -INSERT INTO keys(k) SELECT number FROM system.numbers LIMIT 5000; - -CREATE TABLE tv_times(t UInt32) ENGINE = MergeTree() ORDER BY t; -INSERT INTO tv_times(t) SELECT number * 3 FROM system.numbers LIMIT 50000; - -CREATE TABLE trade_times(t UInt32) ENGINE = MergeTree() ORDER BY t; -INSERT INTO trade_times(t) SELECT number * 10 FROM system.numbers LIMIT 15000; - -CREATE TABLE tvs(k UInt32, t UInt32, tv UInt64) ENGINE = MergeTree() ORDER BY (k, t); -INSERT INTO tvs(k,t,tv) SELECT k, t, t FROM keys CROSS JOIN tv_times; - -CREATE TABLE trades(k UInt32, t UInt32, price UInt64) ENGINE = MergeTree() ORDER BY (k, t); -INSERT INTO trades(k,t,price) SELECT k, t, t FROM keys CROSS JOIN trade_times; - -SELECT SUM(trades.price - tvs.tv) FROM trades ASOF LEFT JOIN tvs USING(k,t); - - -DROP TABLE tvs; -DROP TABLE trades; -DROP TABLE keys; -DROP TABLE tv_times; -DROP TABLE trade_times; diff --git a/dbms/tests/queries/0_stateless/00927_asof_join_long.reference b/dbms/tests/queries/0_stateless/00927_asof_join_long.reference new file mode 100644 index 00000000000..d4f015c68e4 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00927_asof_join_long.reference @@ -0,0 +1 @@ +3000000 diff --git a/dbms/tests/queries/0_stateless/00927_asof_join_long.sql b/dbms/tests/queries/0_stateless/00927_asof_join_long.sql new file mode 100644 index 00000000000..ea9ca430c09 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00927_asof_join_long.sql @@ -0,0 +1,16 @@ +USE test; + +DROP TABLE IF EXISTS tvs; + +CREATE TABLE tvs(k UInt32, t UInt32, tv UInt64) ENGINE = Memory; +INSERT INTO tvs(k,t,tv) SELECT k, t, t +FROM (SELECT toUInt32(number) AS k FROM numbers(1000)) keys +CROSS JOIN (SELECT toUInt32(number * 3) as t FROM numbers(10000)) tv_times; + +SELECT SUM(trades.price - tvs.tv) FROM +(SELECT k, t, t as price + FROM (SELECT toUInt32(number) AS k FROM numbers(1000)) keys + CROSS JOIN (SELECT toUInt32(number * 10) AS t FROM numbers(3000)) trade_times) trades +ASOF LEFT JOIN tvs USING(k,t); + +DROP TABLE tvs;