Repository navigation
Add a functional test for invalid JSON shared-data bucket counts in Native - #117739
Merged
Merged
Conversation
…ative `SerializationObject::deserializeObjectStructureStatePrefix` validates the V3 `shared_data_buckets` count read from the stream, but the only coverage is the gtest `ObjectSerialization.InvalidNumberOfSharedDataBuckets`, which drives the serialization directly rather than the `Native` reader. Add a stateless test that feeds crafted `Native` blocks through `format` and asserts the error code for each corner of the guard: `0`, `SIZE_MAX` and `257` are rejected as `INCORRECT_DATA`, while `256` - the maximum - passes the guard and fails only on the truncated payload. The structure is passed to `format` explicitly, otherwise schema inference wraps the error and the query reports `CANNOT_EXTRACT_TABLE_STRUCTURE` instead. The guard itself landed in #110590. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Contributor
|
Workflow [PR], commit [eaba185] Summary: ✅ AI ReviewSummaryThis PR adds a stateless Final VerdictStatus: ✅ Approve |
…ative-invalid-shared-data-buckets-test
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.
Related: #110590
Adds a stateless test covering the validation of the V3
shared_data_bucketscount in aJSON/ObjectNativestructure prefix. Until now this was only covered by the gtestObjectSerialization.InvalidNumberOfSharedDataBuckets, which drives the serialization directly instead of going through theNativereader.The test feeds crafted
Nativeblocks throughformatand asserts the error code for every corner of the guard:0,SIZE_MAXand257are rejected asINCORRECT_DATA, while256- the maximum - passes the guard and fails only because the crafted block has no payload after the prefix.The guard itself landed in #110590.
Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/117739]
Version info
26.9.1.1587(included in26.9and later)