Skip to content

Commit b2c1c37

Browse files
committed
Update row filter expression formatting in Trino authorization
- Modified the row filter expression construction to wrap each expression in parentheses for improved clarity and consistency. - This change enhances the readability of the generated query strings used in authorization checks. This commit refines the handling of row filter expressions, contributing to better structured queries in the PDP server's Trino integration.
1 parent ea20de6 commit b2c1c37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pdp-server/src/api/trino/row_filter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ async fn get_row_filter_expressions(
152152
query.context.identity.user,
153153
expressions
154154
.iter()
155-
.map(|e| e.expression.clone())
155+
.map(|e| format!("({})", e.expression.clone()))
156156
.collect::<Vec<String>>()
157157
.join(" AND ")
158158
);

0 commit comments

Comments
 (0)