-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for sparse indexes #18
Comments
🎉 This issue has been resolved in version 1.6.0-beta.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 1.7.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Hi @whimzyLive
However, when I define false for a sparseIndex I expect undefined/optional values to be allowed for sort key
This is not working though when I try to create a new user with companyId defined but deptId empty.
Additionally, if i define a default value for deptId, the same error occurs, so it appears as if the code here is running before default value is set.
So my question is what exactly is the expected behavior when isSparse: false? |
As a followup to my previous comment, I observed the opposite behavior with the same entity but a different index:
When I create a user and leave officeStatus undefined it will create the default value for me and will not throw any error like the one from the previous comment. Querying then with PK = companyId and officeStatus = remote works and returns users |
I'm running into the same issue as @michael-pont mentioned above. Please allow sort keys to be optional when defining GSIs on a table. |
Proposed
When parsing entity indexes, allow for sparse indexes
I.e
for Index with
sortKey: PUB_ID#${id}
do not auto parse, when index is marked assparse index
Implementation
sparse
marked keyThe text was updated successfully, but these errors were encountered: