Repository navigation
Conversation
Compare field documentation during schema equality so metadata deduplication retains doc-only updates. Cover nested fields, metadata round trips, unchanged docs, and historical schema reuse; align existing deserialization expectations with their fixture docs.
shangxinli
reviewed
Oct 22, 2026
| bool SchemaField::Equals(const SchemaField& other) const { | ||
| return field_id_ == other.field_id_ && name_ == other.name_ && *type_ == *other.type_ && | ||
| optional_ == other.optional_ && | ||
| optional_ == other.optional_ && doc_ == other.doc_ && |
Contributor
There was a problem hiding this comment.
nit: doc_ is a plain std::string, so no-doc and doc set to empty compare equal here, while Java's Objects.equals at Types.java:983 treats null and empty as different schemas.
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.
Changing only a field's documentation through
SetCurrentSchemasilently reuses the previous schema ID and discards the new doc. IncludedocinSchemaFieldequality so schema deduplication records doc-only changes, including nested fields, while preserving the existing default-value comparisons.Add regressions for required/optional fields, nested struct/list/map fields, doc replacement/addition/removal, metadata JSON round trips, identical-schema deduplication, and historical schema ID reuse. Update two metadata deserialization expectations to include the doc already present in their JSON fixtures.
Validation:
schema_test,table_test, andjson_serde_teston the PR branch based on current upstreammain.clang-formatandgit diff --check.