plusplusjiajia opened a new pull request, #10503: URL: https://github.com/apache/paimon/pull/10503
### Purpose PyPaimon's `SQLContext` is pypaimon-rust's DataFusion context. Both clients manage permissions and data policies through the same REST endpoints, and both read query-auth tables through AuthTableQuery, but no test checks that they agree. This adds those tests. The mock REST server gains the permission, policy and AuthTableQuery endpoints, after Java `RESTCatalogServer`. Grants are keyed and paged like `RESTPermissionStore`. Policies are stored per table, require `query-auth.enabled`, and conflict as `POLICY`. The auth endpoint answers with the policies of the principals the caller acts as, set with `set_query_principals`. `sql_permission_test.py` checks that: - grants and policies made with the `CALL sys.*` procedures are listed by PyPaimon, and the other way round; - a page token returned by one client continues in the other; - under a row filter, both readers return the same rows; - a column mask is applied by PyPaimon, while pypaimon-rust refuses the read because it does not apply masks yet. The test pins this behavior. The tests are marked `native_plan`, so they run only in the Native CI job, which builds paimon-rust from main. The released pypaimon-rust 0.3.0 has neither the procedures nor read-time row filtering. ### Tests With pypaimon-rust built from apache/paimon-rust main (`8aaed4e`) on Python 3.12 and all five `PYPAIMON_TEST_NATIVE_*` switches set, the 5 new tests pass. Without the switches they are skipped. Against the extended mock server, `pypaimon/tests/rest` (366 tests, excluding one that needs the optional `lance` package), `native_plan_rest_test.py` and `sql_context_test.py` still pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
