mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
fix asof big test (timeout & name)
This commit is contained in:
parent
b32c19c1b6
commit
54ae20024f
@ -1 +0,0 @@
|
|||||||
75000000
|
|
@ -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;
|
|
@ -0,0 +1 @@
|
|||||||
|
3000000
|
16
dbms/tests/queries/0_stateless/00927_asof_join_long.sql
Normal file
16
dbms/tests/queries/0_stateless/00927_asof_join_long.sql
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user