Repository navigation
fix(scan): drop the FilterExpression suffix from the values message - #765
Open
LeeroyHannigan wants to merge 1 commit into
Open
LeeroyHannigan wants to merge 1 commit into
LeeroyHannigan wants to merge 1 commit into
Conversation
A Scan that carries ExpressionAttributeValues and no FilterExpression answered "ExpressionAttributeValues can only be specified when using expressions: FilterExpression is null". Amazon DynamoDB ends the message after "expressions", on a table that exists and on one that does not, with or without a ProjectionExpression or a ScanFilter (measured in us-east-1). handle_scan now passes an empty parameter list to validate_expression_param_usage, as Query does, so the message carries no suffix. The dual-target test expects the bare message. Fixes #722.
LeeroyHannigan
requested review from
amrith,
c33howard,
jcshepherd,
pdf-amzn,
robinnsc and
yesyayen
as code owners
November 2, 2026 23:23
This branch has not been deployed
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.
A Scan that carries
ExpressionAttributeValuesand noFilterExpressionansweredExpressionAttributeValues can only be specified when using expressions: FilterExpression is null. Amazon DynamoDB ends the message afterexpressions.Change
handle_scanpasses an empty parameter list tovalidate_expression_param_usage, ashandle_querydoes, so the message carries no suffix.test_scan_values_no_expressionintests/test_expression_param_usage.pyexpects the bare message. The module docstring, the comment on the Query test and the doc comment ofvalidate_expression_param_usageno longer describe a Scan suffix.Measurement
Amazon DynamoDB, us-east-1, 2 November 2026, each request sent twice with identical answers. Every request carries
"ExpressionAttributeValues": {":v": {"S": "x"}}and no expression:ValidationException: ExpressionAttributeValues can only be specified when using expressionspkS HASH,skS RANGE"ProjectionExpression": "a"ScanFilterKeyConditionsonpkThe 31 October measurement in #722 found the same Scan answer on eight further requests. Query already answers the bare message on main.
Testing
cargo +1.97.0 fmt --all -- --checkandcargo +1.97.0 clippy -p extenddb-engine -p extenddb-core --all-targets -- -D warnings: clean.cargo +1.88.0 test --locked -p extenddb-engine -p extenddb-core: 911 passed.devtools/run-tests --extenddb --pytest --filter test_expression_param_usageagainst asqlite-memory,dev-modebuild: 12 passed. With the old&[ExpressionKind::Filter]restored,test_scan_values_no_expressionfails and the other 11 pass.Overlap with #399
The same run found that PutItem, DeleteItem and UpdateItem answer both messages with a
1 validation error detected:prefix and name no parameter. #399 makes that change. It also rewrites this file's module docstring, where it describes the Scan message with theFilterExpression is nullsuffix. The two pull requests conflict on the docstring only; whichever lands second keeps this pull request's description of Scan.Fixes #722.