suddendust opened a new pull request, #15902: URL: https://github.com/apache/pinot/pull/15902
Currently, we use the `TableAuthorizationResult` class to encapsulate authorization results for multiple tables by tracking `_failedTables`. However, this class implements `AuthenticationResult`, which is semantically incorrect - `AuthenticationResult` is intended to represent the result of a single resource, not a collection. Additionally, `TableAuthorizationResult` is not future-proof. For example, it doesn’t allow querying the authorization status of a specific table, which limits its usability. This PR introduces a new interface, `MultiTableAuthResult`, to correctly represent multi-table authorization outcomes. It provides the following methods: 1. `boolean hasAccess()`: Returns true if all tables have access; false otherwise. 2. `Optional<Boolean> hasAccess(String tableName)`: Returns the access result for a specific table. If the table is not part of the result, returns Optional.empty(). 3. `Set<String> getFailedTables()`: Returns the set of tables that failed authorization. 4. `String getFailureMessage()`: Returns a consolidated failure message, similar to TableAuthorizationResult. This new interface improves correctness, extensibility, and clarity when handling multi-table authorization logic. -- 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