-
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 to read Nested objects in attributesToProj… #2030
Conversation
…ect Scan and query requests
SonarCloud Quality Gate failed.
|
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.
BugReportLink
is this supposed to point to an issue? Just takes me too a PR/commit :). Interested in seeing the original bug report if there is one
private static boolean isAttributeToProjectAnExpression(final String attr, | ||
final Map<String, String> projectExpressionNamesMap) { | ||
return projectExpressionNamesMap != null | ||
&& projectExpressionNamesMap.keySet().stream().filter(key -> attr.contains(key)).findAny().isPresent(); |
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.
Can this expression be replaced with Map#containsKey
?
@@ -56,6 +56,12 @@ private ScanOperation(ScanEnhancedRequest request) { | |||
return new ScanOperation<>(request); | |||
} | |||
|
|||
private static boolean isAttributeToProjectAnExpression(final String attr, |
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.
Maybe consider extracting to a utility class
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.
Closing the Pull request without merge as will use other user friendly approach.
Description DDB Enhanced: Added support for Nested objects projection expressions BugReportLink
Motivation and Context
Root Cause
Fix
Why have we created a new parameter called attributesToProjectExpressionNames and not used expressionAttributeNames of
software.amazon.awssdk.services.dynamodb.model.QueryRequest
?Testing
This case is same as attributesToProjectExpressionNames not specified or null.
Screenshots (if appropriate)
Types of changes
Checklist
mvn install
succeedsLicense