feat(dynamodb): add ScanFilter support for Scan operation#175
feat(dynamodb): add ScanFilter support for Scan operation#175naile wants to merge 2 commits intohectorvent:mainfrom
Conversation
Support the legacy ScanFilter parameter in DynamoDB Scan requests. ScanFilter is used by older AWS SDKs and provides per-attribute condition filtering (EQ, NE, LT, LE, GT, GE, BEGINS_WITH, CONTAINS, NOT_CONTAINS, IN, BETWEEN, NOT_NULL, NULL) via ComparisonOperator + AttributeValueList, as an alternative to FilterExpression. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
85f4dd1 to
d1fb435
Compare
There was a problem hiding this comment.
Pull request overview
Adds legacy DynamoDB ScanFilter request support to Floci’s DynamoDB Scan implementation to improve AWS wire-compatibility with older/high-level SDK abstractions.
Changes:
- Extend
DynamoDbService.scan(...)to acceptScanFilterand apply it during scan evaluation. - Wire
ScanFilterparsing inDynamoDbJsonHandlerforDynamoDB_20120810.Scan. - Add unit + integration tests covering basic
ScanFilteroperators (EQ,GE).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/main/java/io/github/hectorvent/floci/services/dynamodb/DynamoDbService.java | Adds scanFilter parameter and implements matchesScanFilter() for legacy ScanFilter evaluation. |
| src/main/java/io/github/hectorvent/floci/services/dynamodb/DynamoDbJsonHandler.java | Parses ScanFilter from Scan requests and forwards it into the service layer. |
| src/test/java/io/github/hectorvent/floci/services/dynamodb/DynamoDbServiceTest.java | Updates/extends service-level tests to include ScanFilter scenarios (but signature updates are incomplete). |
| src/test/java/io/github/hectorvent/floci/services/dynamodb/DynamoDbIntegrationTest.java | Adds HTTP-level integration coverage for ScanFilter over the DynamoDB JSON 1.1 protocol. |
src/main/java/io/github/hectorvent/floci/services/dynamodb/DynamoDbService.java
Show resolved
Hide resolved
src/main/java/io/github/hectorvent/floci/services/dynamodb/DynamoDbService.java
Show resolved
Hide resolved
src/main/java/io/github/hectorvent/floci/services/dynamodb/DynamoDbService.java
Show resolved
Hide resolved
src/test/java/io/github/hectorvent/floci/services/dynamodb/DynamoDbServiceTest.java
Show resolved
Hide resolved
src/test/java/io/github/hectorvent/floci/services/dynamodb/DynamoDbServiceTest.java
Outdated
Show resolved
Hide resolved
src/test/java/io/github/hectorvent/floci/services/dynamodb/DynamoDbIntegrationTest.java
Show resolved
Hide resolved
|
Hi @naile, Thanks for taking the time to contribute! We've seen your PR and will take a look soon. To ensure this implementation stays robust, could you also open a PR in our compatibility suite at https://github.com/hectorvent/floci-compatibility-tests? This helps us validate that your changes keep working perfectly as the project evolves. Also please look at the copilot review comments The Floci team |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Went over and addressed the copilot comments - for pre-existing behaviors/limitations I think these are better to fix separately to keep the scope small. Let me know if you prefer another strategy. I will add a companion compatability test. |
|
Hello @naile, Thanks for the PR! Could you please update the commit history to remove the |
Summary
Adds support for the
ScanFilterparameter in DynamoDBScanrequests.ScanFilteris the legacy condition-based filter for Scan, still actively used on the wire by high-level SDK abstractions such as the .NETTable.Scan()API and Java SDK v1's Document API.Type of change
feat:)AWS Compatibility
Reuses the
ComparisonOperator/AttributeValueListstructure fromQueryFilter/ key conditions already implemented in Floci.Checklist
./mvnw testpasses locally