Repository navigation
fix(memory): PartiQL index reads refuse attributes the index does not hold - #137
Merged
kalaspuff merged 2 commits intoOct 31, 2026
Merged
Conversation
… hold DynamoDB refuses a PartiQL SELECT of a global index whose projection names attributes the index does not project, and one keyed on an index's partition key whose WHERE clause filters on such attributes, on either kind of index (captured by dynoxide-rs in eu-west-2). The in-memory backend returned rows for both. An unkeyed WHERE clause is a scan and still matches nothing on them. Refs #106 Co-authored-by: Carl Oscar Aaro <[email protected]>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Carl Oscar Aaro <[email protected]>
Contributor
Author
|
Stack of 7 pull requests, merged in this order with "Squash and merge":
|
This was referenced Oct 31, 2026
kalaspuff
deleted the
fctl/133-work-through-open-issues-and-open-a-pr-s
branch
October 31, 2026 05:45
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.
Summary
PartiQL
SELECTs of an index in the in-memory DynamoDB returned rows where DynamoDB refuses the statement, so tests could pass where production fails. Following what dynoxide-rs captured against DynamoDB (eu-west-2, 2026-08-15), the memory backend now refuses a projection of a global index that names attributes the index does not project (Global secondary index i does not project [a]), and aWHEREclause keyed on the index's partition key (=orIN, without anOR) that filters on such attributes, on global and local indexes alike (Secondary index i does not project one or more filter attributes: [a]). An unkeyedWHEREclause is a scan and still matches nothing on them; a local index's projection is still fetched from the table.A Rust test of the memory backend covers both refusals, their messages, and the statements that stay accepted;
cargo test, clippy and the consistency checks pass. The low-level access guide says what indexSELECTs may name.This is the PartiQL part of #106. The
QueryandScanAPI part stays open: no capture against DynamoDB says whether it refuses such filters and projections too.Refs #106
Worth confirming
WHEREclause counts as keyed follows dynoxide-rs's model (its disjunctive normal form has a single group naming the partition key), sopk = 'a' AND (x = 1 OR y = 2)is treated as a scan and not refused; only the simpler forms were captured against DynamoDB.fctl session
Note
Low risk. It only changes the in-memory DynamoDB used in tests, and only for PartiQL
SELECTs of an index that DynamoDB itself refuses; nothing reaches real tables.What it does. The in-memory backend now refuses PartiQL
SELECTs of an index that DynamoDB refuses: a projection of a global index that names attributes the index does not hold, and aWHEREclause keyed on the index's partition key that filters on such attributes, for global and local indexes alike. Before, those statements returned rows, so tests could pass where production fails. A unit test of the memory backend, the low-level access guide and the changelog cover it.Unverified keyed-WHERE model. A
WHEREclause counts as keyed only when it has noOR, following dynoxide-rs, sopk = 'a' AND (x = 1 OR y = 2)is treated as a scan and not refused; only the simpler forms were captured against DynamoDB.fctl review's first look at
e75579d· 4 files, +131 −2 · Review agent settings