Skip to content

Commit 90a3ac4

Browse files
committed
Remove cluster adaptation for tables to pass tests
1 parent 50112e7 commit 90a3ac4

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
DROP TABLE IF EXISTS driver_ratings ON CLUSTER cluster_1;
2-
DROP TABLE IF EXISTS user_ratings ON CLUSTER cluster_1;
3-
DROP TABLE IF EXISTS orders ON CLUSTER cluster_1;
4-
DROP TABLE IF EXISTS driver_ratings_queue ON CLUSTER cluster_1;
5-
DROP TABLE IF EXISTS user_ratings_queue ON CLUSTER cluster_1;
6-
DROP TABLE IF EXISTS orders_queue ON CLUSTER cluster_1;
7-
DROP VIEW IF EXISTS user_ratings_queue_mv ON CLUSTER cluster_1;
8-
DROP VIEW IF EXISTS driver_ratings_queue_mv ON CLUSTER cluster_1;
9-
DROP VIEW IF EXISTS orders_queue_mv ON CLUSTER cluster_1;
10-
DROP DATABASE IF EXISTS analytics ON CLUSTER cluster_1;
1+
DROP TABLE IF EXISTS driver_ratings;
2+
DROP TABLE IF EXISTS user_ratings;
3+
DROP TABLE IF EXISTS orders;
4+
DROP TABLE IF EXISTS driver_ratings_queue;
5+
DROP TABLE IF EXISTS user_ratings_queue;
6+
DROP TABLE IF EXISTS orders_queue;
7+
DROP VIEW IF EXISTS user_ratings_queue_mv;
8+
DROP VIEW IF EXISTS driver_ratings_queue_mv;
9+
DROP VIEW IF EXISTS orders_queue_mv;
10+
DROP DATABASE IF EXISTS analytics;
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
CREATE DATABASE IF NOT EXISTS analytics ON CLUSTER cluster_1;
1+
CREATE DATABASE IF NOT EXISTS analytics;
22

3-
CREATE TABLE IF NOT EXISTS analytics.driver_ratings ON CLUSTER cluster_1(
3+
CREATE TABLE IF NOT EXISTS analytics.driver_ratings(
44
rate UInt8,
55
userID Int64,
66
driverID String,
77
orderID String,
88
inserted_time DateTime DEFAULT now()
9-
) ENGINE = ReplicatedMergeTree
9+
) ENGINE = MergeTree
1010
PARTITION BY driverID
1111
ORDER BY (inserted_time);
1212

13-
CREATE TABLE analytics.driver_ratings_queue ON CLUSTER cluster_1(
13+
CREATE TABLE analytics.driver_ratings_queue(
1414
rate UInt8,
1515
userID Int64,
1616
driverID String,
@@ -22,21 +22,21 @@ SETTINGS kafka_broker_list = 'broker:9092',
2222
kafka_format = 'Avro',
2323
kafka_max_block_size = 1048576;
2424

25-
CREATE MATERIALIZED VIEW analytics.driver_ratings_queue_mv ON CLUSTER cluster_1 TO analytics.driver_ratings AS
25+
CREATE MATERIALIZED VIEW analytics.driver_ratings_queue_mv TO analytics.driver_ratings AS
2626
SELECT rate, userID, driverID, orderID
2727
FROM analytics.driver_ratings_queue;
2828

29-
CREATE TABLE IF NOT EXISTS analytics.user_ratings ON CLUSTER cluster_1(
29+
CREATE TABLE IF NOT EXISTS analytics.user_ratings(
3030
rate UInt8,
3131
userID Int64,
3232
driverID String,
3333
orderID String,
3434
inserted_time DateTime DEFAULT now()
35-
) ENGINE = ReplicatedMergeTree
35+
) ENGINE = MergeTree
3636
PARTITION BY userID
3737
ORDER BY (inserted_time);
3838

39-
CREATE TABLE analytics.user_ratings_queue ON CLUSTER cluster_1(
39+
CREATE TABLE analytics.user_ratings_queue(
4040
rate UInt8,
4141
userID Int64,
4242
driverID String,
@@ -48,22 +48,22 @@ SETTINGS kafka_broker_list = 'broker:9092',
4848
kafka_format = 'JSON',
4949
kafka_max_block_size = 1048576;
5050

51-
CREATE MATERIALIZED VIEW analytics.user_ratings_queue_mv ON CLUSTER cluster_1 TO analytics.user_ratings AS
51+
CREATE MATERIALIZED VIEW analytics.user_ratings_queue_mv TO analytics.user_ratings AS
5252
SELECT rate, userID, driverID, orderID
5353
FROM analytics.user_ratings_queue;
5454

55-
CREATE TABLE IF NOT EXISTS analytics.orders ON CLUSTER cluster_1(
55+
CREATE TABLE IF NOT EXISTS analytics.orders(
5656
from_place String,
5757
to_place String,
5858
userID Int64,
5959
driverID String,
6060
orderID String,
6161
inserted_time DateTime DEFAULT now()
62-
) ENGINE = ReplicatedMergeTree
62+
) ENGINE = MergeTree
6363
PARTITION BY driverID
6464
ORDER BY (inserted_time);
6565

66-
CREATE TABLE analytics.orders_queue ON CLUSTER cluster_1(
66+
CREATE TABLE analytics.orders_queue(
6767
from_place String,
6868
to_place String,
6969
userID Int64,
@@ -76,6 +76,6 @@ SETTINGS kafka_broker_list = 'broker:9092',
7676
kafka_format = 'Avro',
7777
kafka_max_block_size = 1048576;
7878

79-
CREATE MATERIALIZED VIEW analytics.orders_queue_mv ON CLUSTER cluster_1 TO orders AS
79+
CREATE MATERIALIZED VIEW analytics.orders_queue_mv TO orders AS
8080
SELECT from_place, to_place, userID, driverID, orderID
8181
FROM analytics.orders_queue;

0 commit comments

Comments
 (0)