-
Notifications
You must be signed in to change notification settings - Fork 866
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Create secondary indices based on table bean annotations (#3923) * detect and group indices present in table schema into LSIs and GSIs * pass request with indices information appended further * Remove specifying provisioned throughput for GSIs (#3923) * If there's no information about the billing mode of the new table, then it'll be using the PAY_PER_REQUEST one. It means that all GSIs related to this table will be doing the same and there's no need to hard code any provisioned throughput like it was done * Allow passing empty indices list to CreateTableOperation (#3923) * CreateTableRequest cannot handle empty list of indices of any type. It throws exception when given such a list. At the same time, it nicely handles the cases when indices lists are null. Make sure then that when empty indices list is passed CreateTableOperation, then in the CreateTableRequest it's just reflected as null. --------- Co-authored-by: Adrian Chlebosz <[email protected]> Co-authored-by: Olivier L Applin <[email protected]>
- Loading branch information
1 parent
e06b2cd
commit ef2aa90
Showing
5 changed files
with
146 additions
and
3 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
.changes/next-release/bugfix-AmazonDynamoDBEnhanced-66db474.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"category": "Amazon DynamoDB Enhanced", | ||
"contributor": "breader124", | ||
"type": "bugfix", | ||
"description": "Thanks to this bugfix it'll be possible to create DynamoDB table containing\nsecondary indices when using no arugments `createTable` method from `DefaultDynamoDbTable`\nclass. Information about their presence might be expressed using annotations, but it was ignored\nand created tables didn't contain specified indices. Plase note that it is still not possible\nto specify projections for indices using annotations. By default, all fields will be projected." | ||
} |
This file contains 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
27 changes: 27 additions & 0 deletions
27
...ced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/internal/client/IndexType.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
package software.amazon.awssdk.enhanced.dynamodb.internal.client; | ||
|
||
import software.amazon.awssdk.annotations.SdkInternalApi; | ||
|
||
/** | ||
* Enum collecting types of secondary indexes | ||
*/ | ||
@SdkInternalApi | ||
public enum IndexType { | ||
LSI, | ||
GSI | ||
} |
This file contains 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
This file contains 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