snazy commented on code in PR #4537:
URL: https://github.com/apache/polaris/pull/4537#discussion_r3308997114
##########
polaris-core/src/main/java/org/apache/polaris/core/storage/gcp/GcpCredentialsStorageIntegration.java:
##########
@@ -202,10 +202,11 @@ public static CredentialAccessBoundary
generateAccessBoundaryRules(
Map<String, List<String>> readConditionsMap = new HashMap<>();
Map<String, List<String>> writeConditionsMap = new HashMap<>();
- HashSet<String> readBuckets = new HashSet<>();
- HashSet<String> writeBuckets = new HashSet<>();
+ LinkedHashSet<String> readBuckets = new LinkedHashSet<>();
+ LinkedHashSet<String> writeBuckets = new LinkedHashSet<>();
Stream.concat(allowedReadLocations.stream(),
allowedWriteLocations.stream())
.distinct()
+ .sorted()
Review Comment:
Does this need to be sorted? Not a big concern, just wondering. I suspect
that's for tests, but if so, maybe add a comment.
##########
polaris-core/src/main/java/org/apache/polaris/core/storage/gcp/GcpCredentialsStorageIntegration.java:
##########
@@ -202,10 +202,11 @@ public static CredentialAccessBoundary
generateAccessBoundaryRules(
Map<String, List<String>> readConditionsMap = new HashMap<>();
Map<String, List<String>> writeConditionsMap = new HashMap<>();
- HashSet<String> readBuckets = new HashSet<>();
- HashSet<String> writeBuckets = new HashSet<>();
+ LinkedHashSet<String> readBuckets = new LinkedHashSet<>();
+ LinkedHashSet<String> writeBuckets = new LinkedHashSet<>();
Review Comment:
Bucket names are already distinct (and sorted).
```suggestion
List<String> readBuckets = new ArrayList<>();
List<String> writeBuckets = new ArrayList<>();
```
##########
polaris-core/src/main/java/org/apache/polaris/core/storage/gcp/GcpCredentialsStorageIntegration.java:
##########
@@ -39,7 +39,7 @@
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
Review Comment:
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]