From fad15e1b6afb17c8acc6da4538a727d7b2a43b93 Mon Sep 17 00:00:00 2001 From: MyroTk <44327070+MyroTk@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:18:56 -0500 Subject: [PATCH 1/8] Update Cargo.toml --- rust/Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 2a2b582cea8f..8e6a3f68ba22 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,6 +7,14 @@ members = [ ] resolver = "2" +# enforce a specific version of `cxx` +[patch.crates-io] +cxx = "1.0.102" +cxx-build = "1.0.102" +cxxbridge-flags = "1.0.102" +cxxbridge-macro = "1.0.102" +link-cplusplus = "1.0.9" + # FIXME: even though the profiles should be defined in the main cargo config we # cannot do this yet, since we compile each package separatelly, so you should # ignore warning from cargo about this. From f73b996b3c4024eecf9a373e196efa1d24445f03 Mon Sep 17 00:00:00 2001 From: MyroTk <44327070+MyroTk@users.noreply.github.com> Date: Wed, 11 Dec 2024 19:01:14 -0500 Subject: [PATCH 2/8] Update Cargo.toml --- rust/skim/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/skim/Cargo.toml b/rust/skim/Cargo.toml index 0381ad81619b..2cdc12da2408 100644 --- a/rust/skim/Cargo.toml +++ b/rust/skim/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] skim = { version = "0.10.2", default-features = false } -cxx = "1.0.83" +cxx = "=1.0.83" term = "0.7.0" [build-dependencies] From 122a2cb7a7402a921bcababbf32edc039589f6fd Mon Sep 17 00:00:00 2001 From: MyroTk <44327070+MyroTk@users.noreply.github.com> Date: Wed, 11 Dec 2024 19:01:25 -0500 Subject: [PATCH 3/8] Update Cargo.toml --- rust/Cargo.toml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 8e6a3f68ba22..2a2b582cea8f 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,14 +7,6 @@ members = [ ] resolver = "2" -# enforce a specific version of `cxx` -[patch.crates-io] -cxx = "1.0.102" -cxx-build = "1.0.102" -cxxbridge-flags = "1.0.102" -cxxbridge-macro = "1.0.102" -link-cplusplus = "1.0.9" - # FIXME: even though the profiles should be defined in the main cargo config we # cannot do this yet, since we compile each package separatelly, so you should # ignore warning from cargo about this. From ad9332f7f2a04e9d712f8e744dde829a38048d90 Mon Sep 17 00:00:00 2001 From: MyroTk <44327070+MyroTk@users.noreply.github.com> Date: Wed, 11 Dec 2024 21:04:12 -0500 Subject: [PATCH 4/8] Update Cargo.toml --- rust/skim/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/skim/Cargo.toml b/rust/skim/Cargo.toml index 2cdc12da2408..78bfd415fcce 100644 --- a/rust/skim/Cargo.toml +++ b/rust/skim/Cargo.toml @@ -11,7 +11,7 @@ cxx = "=1.0.83" term = "0.7.0" [build-dependencies] -cxx-build = "1.0.83" +cxx-build = "=1.0.83" [lib] crate-type = ["staticlib"] From 76bba0ae538adf3fb9f18770c423c0412e0950dc Mon Sep 17 00:00:00 2001 From: Ilya Golshtein Date: Wed, 27 Mar 2024 09:26:12 +0000 Subject: [PATCH 5/8] row_policy_zero_expression: initial --- src/Storages/StorageMerge.cpp | 2 +- .../02763_row_policy_storage_merge.sql.j2 | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/Storages/StorageMerge.cpp b/src/Storages/StorageMerge.cpp index 1eb93f13e9b8..6f780cb6d8a4 100644 --- a/src/Storages/StorageMerge.cpp +++ b/src/Storages/StorageMerge.cpp @@ -688,7 +688,7 @@ QueryPipelineBuilderPtr ReadFromMerge::createSources( database_name, table_name, RowPolicyFilterType::SELECT_FILTER); - if (row_policy_filter_ptr) + if (row_policy_filter_ptr && row_policy_filter_ptr->expression) { row_policy_data_ptr = std::make_unique(row_policy_filter_ptr, storage, context); row_policy_data_ptr->extendNames(real_column_names); diff --git a/tests/queries/0_stateless/02763_row_policy_storage_merge.sql.j2 b/tests/queries/0_stateless/02763_row_policy_storage_merge.sql.j2 index 0263e1a974f0..eabbde9e9dd7 100644 --- a/tests/queries/0_stateless/02763_row_policy_storage_merge.sql.j2 +++ b/tests/queries/0_stateless/02763_row_policy_storage_merge.sql.j2 @@ -129,6 +129,27 @@ SELECT x, lc, cnst from merge(currentDatabase(), '02763_merge_fancycols') ORDER SELECT 'SELECT x, y from merge(currentDatabase(), 02763_merge'; SELECT x, y from merge(currentDatabase(), '02763_merge') ORDER BY x SETTINGS optimize_move_to_prewhere= {{prew}}; + + +CREATE TABLE 02763_t1 ( b String ) ENGINE = MergeTree() ORDER BY tuple(); +INSERT INTO 02763_t1 VALUES('zzz'); +CREATE TABLE 02763_t2 AS 02763_t1 ENGINE = Merge(currentDatabase(), '02763_t1'); + +SELECT 'USING 0'; +CREATE ROW POLICY OR REPLACE 02763_filter_t1 ON 02763_t1 USING 0 TO ALL; +SELECT * FROM 02763_t2 SETTINGS optimize_move_to_prewhere= {{prew}}; + +SELECT 'USING 1'; +CREATE ROW POLICY OR REPLACE 02763_filter_t1 ON 02763_t1 USING 1 TO ALL; +SELECT * FROM 02763_t2 SETTINGS optimize_move_to_prewhere= {{prew}}; + + +DROP TABLE 02763_t1; +DROP TABLE 02763_t2; +SELECT '===='; + + + DROP TABLE 02763_merge_fancycols; DROP ROW POLICY 02763_filter_1 ON 02763_merge_log_1; @@ -140,4 +161,6 @@ DROP ROW POLICY 02763_filter_4 ON 02763_merge_merge_1; DROP ROW POLICY 02763_filter_5 ON 02763_merge_fancycols; DROP ROW POLICY 02763_filter_6 ON 02763_merge_fancycols; +DROP ROW POLICY 02763_filter_t1 ON 02763_t1; + {% endfor %} From f33e5e7e6b3708d925c16ccafe5013062b454ea1 Mon Sep 17 00:00:00 2001 From: Ilya Golshtein Date: Wed, 27 Mar 2024 10:26:03 +0000 Subject: [PATCH 6/8] row_policy_zero_expression: forgotten reference file --- .../0_stateless/02763_row_policy_storage_merge.reference | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/queries/0_stateless/02763_row_policy_storage_merge.reference b/tests/queries/0_stateless/02763_row_policy_storage_merge.reference index 9fa5612e7cd4..6510a3c933e1 100644 --- a/tests/queries/0_stateless/02763_row_policy_storage_merge.reference +++ b/tests/queries/0_stateless/02763_row_policy_storage_merge.reference @@ -166,6 +166,10 @@ SELECT x, y from merge(currentDatabase(), 02763_merge 4 14 4 14 4 14 +USING 0 +USING 1 +zzz +==== SETTINGS optimize_move_to_prewhere= 1 SELECT * FROM 02763_merge_log_1 3 13 @@ -312,3 +316,7 @@ SELECT x, y from merge(currentDatabase(), 02763_merge 4 14 4 14 4 14 +USING 0 +USING 1 +zzz +==== From 97a7e1aa8920ccb646e012150c45c7f2d05c5d47 Mon Sep 17 00:00:00 2001 From: Ilya Golshtein Date: Fri, 29 Mar 2024 23:56:34 +0000 Subject: [PATCH 7/8] row_policy_zero_expression: use RowPolicyFilter::empty() --- src/Storages/StorageMerge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storages/StorageMerge.cpp b/src/Storages/StorageMerge.cpp index 6f780cb6d8a4..ba59a958f112 100644 --- a/src/Storages/StorageMerge.cpp +++ b/src/Storages/StorageMerge.cpp @@ -688,7 +688,7 @@ QueryPipelineBuilderPtr ReadFromMerge::createSources( database_name, table_name, RowPolicyFilterType::SELECT_FILTER); - if (row_policy_filter_ptr && row_policy_filter_ptr->expression) + if (row_policy_filter_ptr && !row_policy_filter_ptr->empty()) { row_policy_data_ptr = std::make_unique(row_policy_filter_ptr, storage, context); row_policy_data_ptr->extendNames(real_column_names); From af49172dd536d3bb015a9f4f35159484af8175ae Mon Sep 17 00:00:00 2001 From: Vasily Nemkov Date: Fri, 13 Dec 2024 18:17:28 +0100 Subject: [PATCH 8/8] Bumped version to 23.8.16.43 --- cmake/autogenerated_versions.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/autogenerated_versions.txt b/cmake/autogenerated_versions.txt index 3da9f1d8a216..869708710181 100644 --- a/cmake/autogenerated_versions.txt +++ b/cmake/autogenerated_versions.txt @@ -8,9 +8,9 @@ SET(VERSION_MINOR 8) SET(VERSION_PATCH 16) SET(VERSION_GITHASH 060ff8e813a4a16a540063127f8c91e2108d9adf) -SET(VERSION_TWEAK 42) +SET(VERSION_TWEAK 43) SET(VERSION_FLAVOUR altinitystable) -SET(VERSION_DESCRIBE v23.8.16.42.altinitystable) -SET(VERSION_STRING 23.8.16.42.altinitystable) +SET(VERSION_DESCRIBE v23.8.16.43.altinitystable) +SET(VERSION_STRING 23.8.16.43.altinitystable) # end of autochange