You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query "DROP TABLE IF EXISTS $mt_table, $s3_table, $mt_table_roundtrip"
15
16
16
17
query "CREATE TABLE $mt_table (id UInt64, year UInt16) ENGINE = MergeTree() PARTITION BY year ORDER BY tuple()"
17
18
query "CREATE TABLE $s3_table (id UInt64, year UInt16) ENGINE = S3(s3_conn, filename='$s3_table', format=Parquet, partition_strategy='hive') PARTITION BY year"
@@ -41,5 +42,12 @@ query "ALTER TABLE $mt_table EXPORT PARTITION ID '2021' TO TABLE $s3_table SETTI
41
42
echo"---- Assert both partitions are there"
42
43
query "SELECT DISTINCT ON (id) replaceRegexpAll(replaceRegexpAll(_path, '$s3_table', 's3_table_NAME'), '[^/]+\\.parquet', 'SNOWFLAKE_ID.parquet'), * FROM $s3_table ORDER BY id"
43
44
45
+
echo"---- Round trip check: create a new MergeTree table as SELECT * from s3_table"
46
+
47
+
query "CREATE TABLE $mt_table_roundtrip ENGINE = MergeTree() PARTITION BY year ORDER BY tuple() AS SELECT * FROM $s3_table"
48
+
49
+
echo"---- Data in roundtrip MergeTree table (should match s3_table)"
50
+
query "SELECT DISTINCT ON (id) * FROM $mt_table_roundtrip ORDER BY id"
51
+
44
52
query "SYSTEM START MERGES"
45
-
query "DROP TABLE IF EXISTS $mt_table, $s3_table"
53
+
query "DROP TABLE IF EXISTS $mt_table, $s3_table, $mt_table_roundtrip"
0 commit comments