-
Notifications
You must be signed in to change notification settings - Fork 886
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
DDB Enhanced: Added support for projection expression #1756
DDB Enhanced: Added support for projection expression #1756
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1756 +/- ##
============================================
- Coverage 76.30% 76.27% -0.03%
Complexity 182 182
============================================
Files 1072 1072
Lines 32252 32308 +56
Branches 2520 2520
============================================
+ Hits 24610 24644 +34
- Misses 6401 6417 +16
- Partials 1241 1247 +6
Continue to review full report at Codecov.
|
I'm not sure how can I fix the Quality Gate - the duplication and missing coverages origins in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please add unit-tests for new behavior in ScanOperation and QueryOperation.
- Please add functional tests to prove this works correctly with Local DynamoDB (see existing functional tests in functionaltests/ folder under tests)
...anced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/model/QueryEnhancedRequest.java
Outdated
Show resolved
Hide resolved
Let's see what happens when we add the unit tests and functional tests that I mentioned in the review, might fix it, if not we can take another look then. |
@musketyr This is a legit missing feature that we planned to follow up with in the future. Thanks for taking it on, we welcome these kinds of contributions. |
Thanks @bmaizels for your feedback, I will change the method signature to |
hi, @bmaizels. I've added the required tests as you wanted. regarding the duplications - it would make sense and make the life of the toolsmiths easier when there is a common interface/ancestor to |
...rc/main/java/software/amazon/awssdk/enhanced/dynamodb/internal/operations/ScanOperation.java
Outdated
Show resolved
Hide resolved
...rc/main/java/software/amazon/awssdk/enhanced/dynamodb/internal/operations/ScanOperation.java
Outdated
Show resolved
Hide resolved
...rc/main/java/software/amazon/awssdk/enhanced/dynamodb/internal/operations/ScanOperation.java
Outdated
Show resolved
Hide resolved
...anced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/model/QueryEnhancedRequest.java
Outdated
Show resolved
Hide resolved
...anced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/model/QueryEnhancedRequest.java
Outdated
Show resolved
Hide resolved
...d/src/test/java/software/amazon/awssdk/enhanced/dynamodb/model/QueryEnhancedRequestTest.java
Outdated
Show resolved
Hide resolved
...d/src/test/java/software/amazon/awssdk/enhanced/dynamodb/model/QueryEnhancedRequestTest.java
Show resolved
Hide resolved
...ed/src/test/java/software/amazon/awssdk/enhanced/dynamodb/model/ScanEnhancedRequestTest.java
Outdated
Show resolved
Hide resolved
...ed/src/test/java/software/amazon/awssdk/enhanced/dynamodb/model/ScanEnhancedRequestTest.java
Show resolved
Hide resolved
...anced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/model/QueryEnhancedRequest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great. Just a few outstanding minor things to address. I'll try and resolve all the other conversations.
...anced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/model/QueryEnhancedRequest.java
Outdated
Show resolved
Hide resolved
...anced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/model/QueryEnhancedRequest.java
Outdated
Show resolved
Hide resolved
...hanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/model/ScanEnhancedRequest.java
Outdated
Show resolved
Hide resolved
Ok I think we're in great shape. Just a few final procedural things. The first you can probably help me with: can we squash this into a single commit with a single concise descriptive commit message for the change? You'll need to squash it first in your local repo then force push to your branch. |
Actually let's wait and make sure checks pass first so you only have to do this once. |
I can try so but in just wonder, isn't it the same as using "Squash and merge" option here on GitHub? |
We disabled that for this repo unfortunately. |
Don't worry about the quality gate I've examined the warnings and they are false positives as far as I'm concerned, so go ahead and squash whenever you are ready. |
78f17be
to
92fa684
Compare
@bmaizels done, luckily it was a quite trivial thing to do. |
@musketyr Hey, the Changelog needs some conflicts fixing because a new release went out today. If you can fix that within the next few hours I should be able to merge this and it will go out in the next release. Thanks! |
added new property attributesToProject to QueryEnhancedRequest and ScanEnhancedRequest which enables to fetch only partial results to save the bandwidth of the queries.
92fa684
to
498040e
Compare
SonarCloud Quality Gate failed.
|
Merged. Thank you very much for your contribution! |
Thank you as well! |
Hey @bmaizels @musketyr |
Description
Added missing support for projection expression into
QueryEnhancedRequest
andScanEnhancedRequest
classes.Motivation and Context
At the moment, there is no way how to obtain just a portion of the data from DynamoDB in OOP manner.
Testing
The tests have been updated to reflect the change.
Types of changes
Checklist
mvn install
succeedsLicense