[spec] Support parsing REST catalog Predicate and Transform JSON#500
Open
plusplusjiajia wants to merge 1 commit into
Open
[spec] Support parsing REST catalog Predicate and Transform JSON#500plusplusjiajia wants to merge 1 commit into
plusplusjiajia wants to merge 1 commit into
Conversation
9ac110f to
5b21096
Compare
5b21096 to
87f5fb1
Compare
Contributor
|
Incompatible with Java legitimate wire format: Java will generate 'LEAF+transform=NULL+function=TRUS/FALSE', which Rust currently explicitly rejects. The result is a failed valid query auth condition (fail closed, not unauthorized, but will erroneously reject the query). |
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
Deserialize the REST catalog's serialized
PredicateandTransformJSON(the row filter / column masking a
query-auth.enabledtable returns) intospec::Predicate/spec::Transform. Parse-only — needed by the query-authenforcement follow-up.
Changes
Predicate::from_rest_json+collect_leaf_field_indicesspec::Transform/TransformInput+Transform::from_rest_json+collect_field_indicesconversion. Tests pin wire strings from Java's
PredicateJsonSerdeTest/TransformJsonSerdeTest.Scope
Structural parsing only, following the crate's existing pattern for
REST-serialized payloads (
Schemauses#[derive(Deserialize)]; the sharedDataTypeparser already accepts lenient type strings for schema columns).It does not replicate the Java parser bit-for-bit:
CASTis parsed structurally; cast applicability is checked where the maskis applied (arrow cast + output-type equality), not here.
LIKEuses SQL escape semantics; row-filter evaluation reuses the sharedresidual evaluator (
arrow/residual.rs), soFloat/Double.compareToandLIKE _edge semantics are Arrow's — a documented limitation