Commit 7a72402
committed
feat: Implement schema diffing for flat schemas
Adds complete diffing functionality for non-nested schemas:
- Field collection and ID-based matching
- Detection of adds, removes, renames, nullability changes
- Physical name validation for column mapping
- Breaking change classification
- Full type classification including arrays and maps
- Ancestor filtering for LCA reporting
Currently supports flat schemas (top-level fields only). The
collect_all_fields_with_paths() function has a commented-out
recursive call that will be enabled in PR 3 to support nested fields.
All other functions are copied exactly from the original PR #1346
(murali-db/schema-evol) with no logic changes.
This is part 2/5 of the schema diffing feature implementation.
Tests included (9 tests):
- test_identical_schemas
- test_change_count
- test_top_level_added_field
- test_added_required_field_is_breaking
- test_added_nullable_field_is_not_breaking
- test_physical_name_validation
- test_multiple_change_types
- test_multiple_with_breaking_change
- test_duplicate_field_id_error
Related to #13461 parent f266aa7 commit 7a72402
1 file changed
+791
-19
lines changed
0 commit comments