abhishekbafna commented on code in PR #16043: URL: https://github.com/apache/pinot/pull/16043#discussion_r2139251464
########## pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java: ########## @@ -919,6 +922,32 @@ private CompileResult compileRequest(long requestId, String query, SqlNodeAndOpt throwAccessDeniedError(requestId, query, requestContext, tableName, authorizationResult); } + //get RLS/CLS filters now + TableRowColAuthResult rlsFilters = accessControl.getRowColFilters(requesterIdentity, tableName); + + //rewrite query + Map<String, String> queryOptions = + pinotQuery.getQueryOptions() == null ? new HashMap<>() : pinotQuery.getQueryOptions(); + + Optional<Map<String, List<String>>> rlsFiltersMaybe = rlsFilters.getRLSFilters(); + if (rlsFiltersMaybe.isPresent()) { + Map<String, List<String>> rowFilters = rlsFiltersMaybe.get(); + StringBuilder sb = new StringBuilder(); + for (String policyId : rowFilters.keySet()) { + List<String> filters = rowFilters.get(policyId); + for (int i = 0; i < filters.size(); i++) { Review Comment: maybe we can use String.join() -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org