Skip to content

Commit befc762

Browse files
authored
Merge pull request #1086 from Altinity/fp_antalya_25_8_export_mt_part
Try to fix export mt part test issue
2 parents 6f14137 + 96568d1 commit befc762

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

tests/queries/0_stateless/03377_object_storage_list_objects_cache.reference

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
-- { echoOn }
22

33
-- The cached key should be `dir_`, and that includes all three files: 1, 2 and 3. Cache should return all three, but ClickHouse should filter out the third.
4-
SELECT _path, * FROM s3(s3_conn, filename='dir_a/dir_b/t_03377_sample_{1..2}.parquet') order by id SETTINGS use_object_storage_list_objects_cache=1;
4+
SELECT _path, id FROM s3(s3_conn, filename='dir_a/dir_b/t_03377_sample_{1..2}.parquet') order by id SETTINGS use_object_storage_list_objects_cache=1;
55
test/dir_a/dir_b/t_03377_sample_1.parquet 1
66
test/dir_a/dir_b/t_03377_sample_2.parquet 2
77
-- Make sure the filtering did not interfere with the cached values
8-
SELECT _path, * FROM s3(s3_conn, filename='dir_a/dir_b/t_03377_sample_*.parquet') order by id SETTINGS use_object_storage_list_objects_cache=1;
8+
SELECT _path, id FROM s3(s3_conn, filename='dir_a/dir_b/t_03377_sample_*.parquet') order by id SETTINGS use_object_storage_list_objects_cache=1;
99
test/dir_a/dir_b/t_03377_sample_1.parquet 1
1010
test/dir_a/dir_b/t_03377_sample_2.parquet 2
1111
test/dir_a/dir_b/t_03377_sample_3.parquet 3

tests/queries/0_stateless/03377_object_storage_list_objects_cache.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ SELECT * FROM s3(s3_conn, filename='dir_**.parquet') Format Null SETTINGS use_ob
1616
-- { echoOn }
1717

1818
-- The cached key should be `dir_`, and that includes all three files: 1, 2 and 3. Cache should return all three, but ClickHouse should filter out the third.
19-
SELECT _path, * FROM s3(s3_conn, filename='dir_a/dir_b/t_03377_sample_{1..2}.parquet') order by id SETTINGS use_object_storage_list_objects_cache=1;
19+
SELECT _path, id FROM s3(s3_conn, filename='dir_a/dir_b/t_03377_sample_{1..2}.parquet') order by id SETTINGS use_object_storage_list_objects_cache=1;
2020

2121
-- Make sure the filtering did not interfere with the cached values
22-
SELECT _path, * FROM s3(s3_conn, filename='dir_a/dir_b/t_03377_sample_*.parquet') order by id SETTINGS use_object_storage_list_objects_cache=1;
22+
SELECT _path, id FROM s3(s3_conn, filename='dir_a/dir_b/t_03377_sample_*.parquet') order by id SETTINGS use_object_storage_list_objects_cache=1;
2323

2424
SYSTEM FLUSH LOGS;
2525

tests/queries/0_stateless/03572_export_replicated_merge_tree_part_to_object_storage.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ query "ALTER TABLE $rmt_table EXPORT PART '$part_2020' TO TABLE $s3_table SETTIN
3535

3636
query "SELECT * FROM $s3_table ORDER BY id"
3737

38-
query "CREATE TABLE $rmt_table_roundtrip ENGINE = ReplicatedMergeTree('/clickhouse/tables/{database}/$rmt_table_roundtrip', 'replica1') PARTITION BY year ORDER BY tuple() AS SELECT * FROM $s3_table"
38+
query "CREATE TABLE $rmt_table_roundtrip (id UInt64, year UInt16) ENGINE = ReplicatedMergeTree('/clickhouse/tables/{database}/$rmt_table_roundtrip', 'replica1') PARTITION BY year ORDER BY tuple()"
39+
query "INSERT INTO $rmt_table_roundtrip SELECT * FROM $s3_table"
3940

4041
echo "---- Data in roundtrip ReplicatedMergeTree table (should match s3_table)"
4142
query "SELECT * FROM $rmt_table_roundtrip ORDER BY id"

0 commit comments

Comments
 (0)