mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 03:53:41 +00:00
Co-authored-by: robot-clickhouse <robot-clickhouse@users.noreply.github.com>
This commit is contained in:
parent
3b0fda512b
commit
1ea2a1dd63
@ -583,7 +583,7 @@ std::vector<ReadFromMerge::ChildPlan> ReadFromMerge::createChildrenPlans(SelectQ
|
||||
database_name,
|
||||
table_name,
|
||||
RowPolicyFilterType::SELECT_FILTER);
|
||||
if (row_policy_filter_ptr)
|
||||
if (row_policy_filter_ptr && !row_policy_filter_ptr->empty())
|
||||
{
|
||||
row_policy_data_opt = RowPolicyData(row_policy_filter_ptr, storage, modified_context);
|
||||
row_policy_data_opt->extendNames(real_column_names);
|
||||
|
@ -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
|
||||
====
|
||||
|
@ -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 %}
|
||||
|
Loading…
Reference in New Issue
Block a user