9aman commented on code in PR #16043: URL: https://github.com/apache/pinot/pull/16043#discussion_r2160942742
########## pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java: ########## @@ -434,6 +436,20 @@ protected BrokerResponse doHandleRequest(long requestId, String query, SqlNodeAn throwAccessDeniedError(requestId, query, requestContext, tableName, authorizationResult); } + TableRowColAuthResult rlsFilters = accessControl.getRowColFilters(requesterIdentity, tableName); + + //rewrite query + Map<String, String> queryOptions = + pinotQuery.getQueryOptions() == null ? new HashMap<>() : pinotQuery.getQueryOptions(); + + rlsFilters.getRLSFilters().ifPresent(rowFilters -> { + String combinedFilters = + rowFilters.stream().map(filter -> "( " + filter + " )").collect(Collectors.joining(" AND ")); + queryOptions.put(tableName, combinedFilters); + pinotQuery.setQueryOptions(queryOptions); + CalciteSqlParser.queryRewrite(pinotQuery); Review Comment: Fixed it. -- 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