Skip to content

Row polcies issue on 25.8.12.20747.altinityantalya #1250

@alsugiliazova

Description

@alsugiliazova

Describe the bug

I have merge tree table with 100 rows:

   ┌─statement──────────────────────────────────────────────────────────────────┐
1. │ CREATE TABLE default.merge_tree_table_d8a6449e_e04c_11f0_806a_e0c26496f172↴│
   │↳(                                                                         ↴│
   │↳    `boolean_col` Nullable(Bool),                                         ↴│
   │↳    `long_col` Nullable(Int64),                                           ↴│
   │↳    `double_col` Nullable(Float64),                                       ↴│
   │↳    `string_col` Nullable(String),                                        ↴│
   │↳    `date_col` Nullable(Date)                                             ↴│
   │↳)                                                                         ↴│
   │↳ENGINE = MergeTree                                                        ↴│
   │↳ORDER BY tuple()                                                          ↴│
   │↳SETTINGS index_granularity = 8192                                          │
   └────────────────────────────────────────────────────────────────────────────┘

I have iceberg table with same data:


   ┌─statement───────────────────────────────────────────────────────────────────────┐
1. │ CREATE TABLE row_policy.`row_policy.table_d7e60ec1_e04c_11f0_8e49_e0c26496f172`↴│
   │↳(                                                                              ↴│
   │↳    `boolean_col` Nullable(Bool),                                              ↴│
   │↳    `long_col` Nullable(Int64),                                                ↴│
   │↳    `double_col` Nullable(Float64),                                            ↴│
   │↳    `string_col` Nullable(String),                                             ↴│
   │↳    `date_col` Nullable(Date)                                                  ↴│
   │↳)                                                                              ↴│
   │↳ENGINE = Iceberg('http://minio:9000/warehouse/data/', 'admin', '[HIDDEN]')      │
   └─────────────────────────────────────────────────────────────────────────────────┘

I create following row policy for user user1_ee5a93a1_e04c_11f0_ad97_e0c26496f172

CREATE ROW POLICY row_policy_eea078bc_e04c_11f0_8844_e0c26496f172 ON merge_tree_table_d8a6449e_e04c_11f0_806a_e0c26496f172, row_policy.\`row_policy.table_d7e60ec1_e04c_11f0_8e49_e0c26496f172\` USING boolean_col = 1 AND long_col in range(1, 100) AS PERMISSIVE TO user1_ee5a93a1_e04c_11f0_ad97_e0c26496f172

I expect identical results from merge tree table and iceberg table, but I get different outputs:

SELECT *
FROM default.merge_tree_table_d8a6449e_e04c_11f0_806a_e0c26496f172
ORDER BY tuple(*) ASC
Query id: eb0f6a88-58c9-4ae2-869c-e28036a070d0

   ┌─boolean_col─┬─long_col─┬─double_col─┬─string_col─┬───date_col─┐
1. │ true        │       59 │      36.43 │ 0          │ 2020-03-05 │
   └─────────────┴──────────┴────────────┴────────────┴────────────┘

1 row in set. Elapsed: 0.002 sec. 
SELECT *
FROM row_policy.`row_policy.table_d7e60ec1_e04c_11f0_8e49_e0c26496f172`
ORDER BY tuple(*) ASC
Query id: 35453164-3a7e-418c-9963-40b91db535bb

Ok.

0 rows in set. Elapsed: 0.017 sec. 

Metadata

Metadata

Assignees

Labels

antalyabugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions