Repository navigation
Open API: [4/N] Add RCK tests for ReadRestrictions - #17809
Open
singhpk234 wants to merge 12 commits into
Open
singhpk234 wants to merge 12 commits into
singhpk234 wants to merge 12 commits into
Conversation
|
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions. |
Adds FunctionReference and UnboundApply, and Expressions factory methods to build function application terms from the expressions spec.
Serializes predicates in the form defined in format/expressions-spec.md, including apply terms and field-id references, while continuing to accept the deprecated term-based form.
Keeps the original structure of the unbound predicate writer, stores apply arguments in an array so the class is Kryo serializable, and splits the null-catalog function reference check into its own test. Generated-by: Claude Code
Adds BoundApply so that an UnboundApply with a known result type can be bound by binding each of its arguments. Bound applies can be written to JSON and unbound. Applies without a result type, such as those read from JSON, still cannot be bound. Generated-by: Claude Code
The expressions spec defines partition transforms as functions in the iceberg_functions catalog, and a function reference without a catalog refers to the catalog of the referencing object. Only read applies as transforms when they use the iceberg_functions catalog, and write transforms with it. Generated-by: Claude Code
The expressions spec defines partition transforms as functions in the iceberg_functions catalog. UnboundTransform and BoundTransform now extend UnboundApply and BoundApply, so the parser writes them through the same path as other function applications. Generated-by: Claude Code
Removes Expressions.apply and makes UnboundApply.arguments package-private so function arguments typed as Object are not public API until a function argument type exists. Stores function reference identifiers in an array for Kryo, and trims redundant comments and code. Generated-by: Claude Code
…on format Generated-by: Claude Code
Adds the org.apache.iceberg.functions package, the engine-side Java API for the column projection actions defined by the ReadRestrictions spec. Each function takes a column value and applies a masking or transformation operation. UnknownFunction parses unrecognized action names and fails closed at bind time.
Make IcebergFunction a column-agnostic definition that binds to a type, following Transform and Transforms: implementations are package-private singletons reached through IcebergFunctions, toString() returns the function name, and serialization proxies keep the singletons unique. The field id is removed so callers pair a function with a column, as PartitionField does with a transform. Function names use snake_case. Factories return functions whose input and output types match, as the spec requires actions to preserve the column type, and string functions accept any CharSequence, Iceberg's representation for strings. Also fix mask_to_fixed_value accepting structs whose fields it cannot mask, and its bound functions for binary and fixed values not being serializable. Generated-by: Claude Code
Carry the per-principal read restrictions from REST load, create, and register responses on the loaded table, and validate that every column projection targets a field id present in the table's schemas. Row filter references are field ids per the spec, so they are resolved against the schema in the same response; a filter that cannot be resolved fails the load rather than being dropped. Builds on the column-agnostic IcebergFunction API: an Action pairs a function with the field id it applies to, matching the spec's Action shape. Client-side enforcement in the data module is left to a follow-up. Generated-by: Claude Code
Add REST Compatibility Kit tests that validate the read-restrictions wire format round-trip through LoadTableResponse. The server adapter injects a mask-to-fixed-value restriction for tables in a configured namespace, and the tests verify the restriction is propagated to the loaded table via SupportsReadRestrictions, and that tables outside that namespace load without restrictions. Generated-by: Claude Code
sfc-gh-prsingh
force-pushed
the
feature/rck-read-restrictions
branch
from
October 23, 2026 02:29
ce6392e to
fc0d86a
Compare
singhpk234
marked this pull request as ready for review
October 23, 2026 02:33
This branch has not been deployed
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.
Adds REST Compatibility Kit coverage for the read-restrictions field on loadTable. The test server injects a mask-to-fixed-value projection for tables in a configured namespace, and the tests check that the client carries it onto the loaded table through
SupportsReadRestrictionswith the right field ID and function, and that tables outside that namespace load with no restrictions. Servers that don't support read restrictions can opt out withrck.supports-read-restrictions=false. Stacked on #16131; review onlyopen-api/src/testandopen-api/src/testFixtures.