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
Describe the unexpected behaviour
If we read from projection, row policy is disabled explicitly. It can be ok if we have added the projection explicitly (but still need to be documented), because it's unclear how to filter rows, since the row policy expression is set for original rows. But projection from minmax index is created implicitly and enabled by default and it's unexpected that it will allow to run some simple queries ignoring row policies.
How to reproduce
CREATETABLEt(a UInt32, b UInt32) ENGINE = MergeTree PARTITION BY a ORDER BY a;
INSERT INTO t SELECTnumber % 10, numberFROM numbers(10000);
CREATE ROW POLICY OR REPLACE rp ONdefault.t FOR SELECT USING 0 TO ALL;
SELECTcount(), min(a), max(a) FROM t;
┌─count()─┬─min(a)─┬─max(a)─┐
│ 10000 │ 0 │ 9 │
└─────────┴────────┴────────┘
SELECTcount(), min(a), max(a), sum(a) FROM t;
┌─count()─┬─min(a)─┬─max(a)─┬─sum(a)─┐
│ 0 │ 0 │ 0 │ 0 │
└─────────┴────────┴────────┴────────┘
SET allow_experimental_projection_optimization =0;
SELECTcount(), min(a), max(a) FROM t;
┌─count()─┬─min(a)─┬─max(a)─┐
│ 0 │ 0 │ 0 │
└─────────┴────────┴────────┘
Expected behavior
Do not use implicitly created projection if row policy is set.
The text was updated successfully, but these errors were encountered:
If we read from projection, row policy is disabled explicitly.
User defined projections support row policy properly, test
min_max_count projection is special when dealing with filters. It always uses PartitionPruner, which means related KeyCondition should be properly constructed. However, we don't support using row policy in any kind of index analysis yet.
Describe the unexpected behaviour
If we read from projection, row policy is disabled explicitly. It can be ok if we have added the projection explicitly (but still need to be documented), because it's unclear how to filter rows, since the row policy expression is set for original rows. But projection from minmax index is created implicitly and enabled by default and it's unexpected that it will allow to run some simple queries ignoring row policies.
How to reproduce
Expected behavior
Do not use implicitly created projection if row policy is set.
The text was updated successfully, but these errors were encountered: