Support composite constraints in KG builder schemas#512
Open
adamnsch wants to merge 2 commits intoneo4j:mainfrom
Open
Support composite constraints in KG builder schemas#512adamnsch wants to merge 2 commits intoneo4j:mainfrom
adamnsch wants to merge 2 commits intoneo4j:mainfrom
Conversation
28c815e to
2e064b9
Compare
2e064b9 to
738b366
Compare
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.
Description
Summary
constraint types
ConstraintTypegains aproperty_names: Tuple[str, ...]field; the oldproperty_name: strfield is deprecated but still accepted via abefore-validator migration
doesn't support composite existence)
constraintslist alongsideper-column
is_primary_key/is_uniquebooleans, preserving compositegrouping for downstream consumers
property_names(list) format onlyproperty_nametoproperty_names;backward-compat test explicitly asserts the deprecation warning
Breaking changes
None. The old
property_namefield is still accepted in input (dicts,JSON) and migrated automatically. Accessing
constraint.property_nameonan instance emits a
DeprecationWarning.Testing
14 new unit tests cover: composite KEY/UNIQUENESS creation and validation,
EXISTENCE rejection of composite, backward-compat migration, property
validation, exclusivity checks, ParquetWriter metadata output with
composite constraints, LLM extraction round-trip for composite
KEY/UNIQUENESS, and extraction filtering (rejects composite EXISTENCE,
drops composites referencing nonexistent properties). Existing tests
updated to use
property_namesthroughout.Type of Change
Complexity
Complexity: Medium
How Has This Been Tested?
Checklist
The following requirements should have been met (depending on the changes in the branch):