From 3be79fc145f9c1322ce6a200bbcea66cc4eb9633 Mon Sep 17 00:00:00 2001 From: kssenii Date: Sun, 28 Aug 2022 15:57:46 +0200 Subject: [PATCH] Fix --- ...filesystem_cache_persistent_files.reference | 18 +++++++++--------- ...02382_filesystem_cache_persistent_files.sql | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/queries/0_stateless/02382_filesystem_cache_persistent_files.reference b/tests/queries/0_stateless/02382_filesystem_cache_persistent_files.reference index d3d9ce25569..7f79a172f4b 100644 --- a/tests/queries/0_stateless/02382_filesystem_cache_persistent_files.reference +++ b/tests/queries/0_stateless/02382_filesystem_cache_persistent_files.reference @@ -9,7 +9,7 @@ INSERT INTO nopers SELECT number, toString(number) FROM numbers(10); SELECT * FROM nopers FORMAT Null; SELECT sum(size) FROM system.filesystem_cache; 194 -SELECT substring(local_path, 58, 10) as file, substring(cache_path, 53, 20) as cache, size +SELECT extract(local_path, '.*/([\w.]+)') as file, extract(cache_path, '.*/([\w.]+)') as cache, size FROM ( SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path @@ -19,8 +19,8 @@ INNER JOIN system.filesystem_cache AS caches ON data_paths.cache_path = caches.cache_path ORDER BY file, cache, size; -data.bin 114 -data.mrk3 80 +data.bin 0 114 +data.mrk3 0 80 DROP TABLE IF EXISTS test; CREATE TABLE test (key UInt32, value String) Engine=MergeTree() ORDER BY key SETTINGS storage_policy='s3_cache_small', min_bytes_for_wide_part = 10485760; SYSTEM STOP MERGES test; @@ -32,7 +32,7 @@ SELECT count() FROM (SELECT arrayJoin(cache_paths) AS cache_path, local_path, re 4 SELECT count() FROM system.filesystem_cache; 4 -SELECT substring(local_path, 58, 10) as file, substring(cache_path, 53, 20) as cache, size +SELECT extract(local_path, '.*/([\w.]+)') as file, extract(cache_path, '.*/([\w.]+)') as cache, size FROM ( SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path @@ -42,9 +42,9 @@ INNER JOIN system.filesystem_cache AS caches ON data_paths.cache_path = caches.cache_path ORDER BY file, cache, size; -data.bin 114 +data.bin 0 114 data.bin 0 746 -data.mrk3 80 +data.mrk3 0 80 data.mrk3 0_persistent 80 DROP TABLE IF EXISTS test2; CREATE TABLE test2 (key UInt32, value String) Engine=MergeTree() ORDER BY key SETTINGS storage_policy='s3_cache_small', min_bytes_for_wide_part = 10485760; @@ -57,7 +57,7 @@ SELECT count() FROM (SELECT arrayJoin(cache_paths) AS cache_path, local_path, re 4 SELECT count() FROM system.filesystem_cache; 4 -SELECT substring(local_path, 58, 10) as file, substring(cache_path, 53, 20) as cache, size +SELECT extract(local_path, '.*/([\w.]+)') as file, extract(cache_path, '.*/([\w.]+)') as cache, size FROM ( SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path @@ -67,8 +67,8 @@ INNER JOIN system.filesystem_cache AS caches ON data_paths.cache_path = caches.cache_path ORDER BY file, cache, size; -data.bin 114 -data.mrk3 80 +data.bin 0 114 +data.mrk3 0 80 data.mrk3 0_persistent 80 data.mrk3 0_persistent 520 DROP TABLE test; diff --git a/tests/queries/0_stateless/02382_filesystem_cache_persistent_files.sql b/tests/queries/0_stateless/02382_filesystem_cache_persistent_files.sql index 0492df2a19b..d7171de48ad 100644 --- a/tests/queries/0_stateless/02382_filesystem_cache_persistent_files.sql +++ b/tests/queries/0_stateless/02382_filesystem_cache_persistent_files.sql @@ -1,4 +1,4 @@ --- Tags: disabled +-- Tags: no-fasttest, no-parallel, no-s3-storage, no-random-settings -- { echo } @@ -14,7 +14,7 @@ INSERT INTO nopers SELECT number, toString(number) FROM numbers(10); SELECT * FROM nopers FORMAT Null; SELECT sum(size) FROM system.filesystem_cache; -SELECT substring(local_path, 58, 10) as file, substring(cache_path, 53, 20) as cache, size +SELECT extract(local_path, '.*/([\w.]+)') as file, extract(cache_path, '.*/([\w.]+)') as cache, size FROM ( SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path @@ -37,7 +37,7 @@ SELECT sum(size) FROM system.filesystem_cache; SELECT count() FROM (SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path FROM system.remote_data_paths ) AS data_paths INNER JOIN system.filesystem_cache AS caches ON data_paths.cache_path = caches.cache_path; SELECT count() FROM system.filesystem_cache; -SELECT substring(local_path, 58, 10) as file, substring(cache_path, 53, 20) as cache, size +SELECT extract(local_path, '.*/([\w.]+)') as file, extract(cache_path, '.*/([\w.]+)') as cache, size FROM ( SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path @@ -60,7 +60,7 @@ SELECT sum(size) FROM system.filesystem_cache; SELECT count() FROM (SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path FROM system.remote_data_paths ) AS data_paths INNER JOIN system.filesystem_cache AS caches ON data_paths.cache_path = caches.cache_path; SELECT count() FROM system.filesystem_cache; -SELECT substring(local_path, 58, 10) as file, substring(cache_path, 53, 20) as cache, size +SELECT extract(local_path, '.*/([\w.]+)') as file, extract(cache_path, '.*/([\w.]+)') as cache, size FROM ( SELECT arrayJoin(cache_paths) AS cache_path, local_path, remote_path