cecemei commented on code in PR #17564:
URL: https://github.com/apache/druid/pull/17564#discussion_r1891062899


##########
processing/src/main/java/org/apache/druid/query/DataSource.java:
##########
@@ -118,6 +123,27 @@ public interface DataSource
    */
   DataSource withUpdatedDataSource(DataSource newSource);
 
+  default DataSource mapWithRestriction(Map<String, Optional<DimFilter>> 
rowFilters)
+  {
+    return mapWithRestriction(rowFilters, true);
+  }
+
+  /**
+   * Returns an updated datasource based on the policy restrictions on tables. 
If this datasource contains no table, no
+   * changes should occur.
+   *
+   * @param rowFilters a mapping of table names to row filters, every table in 
the datasource tree must have an entry

Review Comment:
   Takes Map<String, Optional<Policy>> now, since policy is optional for druid 
tables, ppl can config any (or all) tables to be policy restricted. It's a 
single policy, since policy is returned from authorizer and it's a merged 
result of (policy rule, or policy template, which could be a serialized format 
and supports crud and stuff). 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to