[table] Support query-auth row filters and column masking at read time#513
Draft
plusplusjiajia wants to merge 1 commit into
Draft
[table] Support query-auth row filters and column masking at read time#513plusplusjiajia wants to merge 1 commit into
plusplusjiajia wants to merge 1 commit into
Conversation
42dee01 to
c061a12
Compare
c061a12 to
71c6710
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Apply the per-user query-auth grant on the read path. Since #447 the client fails closed on every
query-auth.enabledtable; with this change a granted read goes through: the row filter and column maskingreturned by the REST catalog's
authTableQueryare enforced exactly, and reads the grant cannot cover keep failing closed.Brief change log
TableScan::plan/FormatTableScan::plan/ searchexecute_scoredfetch and verify the grant (where Java appliesCatalogEnvironment.tableQueryAuth()), scoped to theplanned projection ∪ filter columns; wider reads fail closed until re-plan.
TableRead::to_arrow: the physical read is widened with the grant's filter columns and mask inputs, each batch is filtered on raw values, masked columns are overwritten, thenre-projected to the caller's columns (mirrors [core] Add row filter & column masking support for table read paimon#7034; cross-column masks per [WIP][core] Fix column masking correctness in query-auth reads paimon#8570).
Plan::row_counts_exact()false — count-based limit pushdown is skipped and DataFusion cannot answerCOUNT(*)from unfiltered statistics.