mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(dynamodb): order unprojected PartiQL columns by name hash (#8867)
* fix(dynamodb): order unprojected PartiQL columns by name hash
This commit is contained in:
1 parent
10824e6701
commit
0aa5ecd1de
2 files changed
+29
-2
No files matched your search
+17
@@ -11,6 +11,7 @@ import org.junit.jupiter.api.TestMethodOrder;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
@@ -1012,6 +1013,22 @@ class DynamoDbPartiQLEdgeCaseIntegrationTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(37)
|
||||
void listsUnprojectedColumnsInTheSameOrderWhateverTheStatementOrder() {
|
||||
String refused = "One or more parameter values were invalid: Global secondary index gsi-inc does not project ";
|
||||
Map<List<String>, String> lists = Map.of(
|
||||
List.of("nonproj", "lsiSk"), "[nonproj, lsiSk]",
|
||||
List.of("lsiSk", "nonproj"), "[nonproj, lsiSk]",
|
||||
List.of("alpha", "beta", "gamma", "delta"), "[delta, alpha, gamma, beta]",
|
||||
List.of("x1", "x2", "x3", "x10", "x20"), "[x10, x20, x1, x2, x3]");
|
||||
|
||||
lists.forEach((columns, list) -> statement("SELECT " + String.join(", ", columns)
|
||||
+ " FROM \"partiql-edge-cases-index\".\"gsi-inc\" WHERE gsiPk = 'y'")
|
||||
.statusCode(400)
|
||||
.body("message", equalTo(refused + list)));
|
||||
}
|
||||
|
||||
private static void putItem(String pk, String attributes) {
|
||||
putItem(pk, "1", attributes);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user