v.25.12Improvement
Add a new
Added a new setting apply_row_policy_after_final that allows the query to apply row policy only after final, which will make the behavior for ReplacingMergeTree with row policies more correct. Fixes #90986. #91065 (Yarik Briukhovetskyi).Why it matters
This feature addresses the issue where row policies were applied before theFINAL clause processing, leading to incorrect query results on tables such as ReplacingMergeTree. By allowing policies to be applied after finalization, it ensures more accurate and expected filtering of rows, enhancing security and correctness.How to use it
Users can enable this behavior by setting theapply_row_policy_after_final parameter to 1 (true) in their session or configuration. This will make the query apply row policies only after the FINAL modifier is processed.