composite key support for GSIs #6574
Open
+13,220
−539
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.
Support for defining GSIs with up to 4 partition and 4 sort key attributes, plus the ability to query those GSIs with structured conditions via the Enhanced Client.
Key constraints for composite key queries:
Motivation and Context
Context, feature description and implementation details available in Twin Cities solution proposal.
Modifications
int orderparameter inDynamoDbSecondaryPartitionKeyandDynamoDbSecondarySortKeyinterfaces to ensure consistent order of the composite keys definition at HL client level.StaticTableMetadatato compute the list of indices during schema creation and enhancedBeanTableSchema,ImmutableTableSchemaandStaticTableSchemato validate them. Also added support for defining GSI composite keys on flattened objects.CreateTableOperationto compute the list of GSI indexes with composite keys support.QueryConditionalimplementations to support twin cities rules.Testing
New unit tests added for the GSI composite key extension.
New integration tests added to cover all query conditional operators applied on GSIs with 1 to 4 composite keys combination.
Test Coverage Checklist
Screenshots (if appropriate)
Types of changes
Checklist
mvn installsucceedsscripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes.License