Copilot commented on code in PR #4530:
URL: https://github.com/apache/polaris/pull/4530#discussion_r3287130067


##########
runtime/service/src/test/java/org/apache/polaris/service/catalog/io/FileIOExceptionsTest.java:
##########
@@ -109,7 +109,7 @@ public static void beforeAll(@TempDir Path tempDir) {
             .createNamespace(
                 FileIOExceptionsTest.catalog,
                 
CreateNamespaceRequest.builder().withNamespace(Namespace.of("ns1")).build(),
-                new UUID(0L, 0L) /* TODO UUID v7 */,
+                new UUID(116617318654508422L, -7820829973016961092L) /* UUID 
v7 */,
                 services.realmContext(),

Review Comment:
   The same hard-coded UUID v7 string is parsed via UUID.fromString(...) in 
multiple places in this test. To reduce duplication and avoid repeated parsing, 
consider extracting it into a single static final UUID constant (for example, 
IDEMPOTENCY_KEY) and reusing that constant throughout the file.



##########
runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergAllowedLocationTest.java:
##########
@@ -102,7 +102,7 @@ void 
testCreateTableOutSideOfCatalogAllowedLocations(@TempDir Path tmpDir) {
                     namespace,
                     createTableRequest,
                     null,
-                    new UUID(0L, 0L) /* TODO UUID v7 */,
+                    new UUID(116617318654508422L, -7820829973016961092L) /* 
UUID v7 */,
                     services.realmContext(),

Review Comment:
   UUID.fromString("019e4ed5-...") is duplicated across multiple calls in this 
file. Extracting a static final UUID constant for the idempotency key would 
reduce repetition and make future updates safer.



##########
runtime/service/src/test/java/org/apache/polaris/service/admin/PolarisS3InteroperabilityTest.java:
##########
@@ -135,7 +135,7 @@ private GetNamespaceResponse createNamespace(
             .createNamespace(
                 catalogName,
                 createNamespaceRequest,
-                new UUID(0L, 0L) /* TODO UUID v7 */,
+                new UUID(116617318654508422L, -7820829973016961092L) /* UUID 
v7 */,
                 services.realmContext(),

Review Comment:
   This file repeats the same UUID.fromString("019e4ed5-...") literal for the 
idempotency key. Consider extracting it into a single static final UUID 
constant to reduce duplication and improve readability.



##########
runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergOverlappingTableTest.java:
##########
@@ -79,7 +79,7 @@ private int createTable(TestServices services, String 
location) {
                 namespace,
                 createTableRequest,
                 null,
-                new UUID(0L, 0L) /* TODO UUID v7 */,
+                new UUID(116617318654508422L, -7820829973016961092L) /* UUID 
v7 */,
                 services.realmContext(),

Review Comment:
   This test repeats the same UUID.fromString("019e4ed5-...") literal in many 
calls. Consider defining a shared static final UUID constant (for example, 
IDEMPOTENCY_KEY) and using it everywhere to keep the test easier to maintain.



##########
runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/CommitTransactionEventTest.java:
##########
@@ -183,7 +183,7 @@ private void createCatalogAndNamespace(
             .createNamespace(
                 catalog,
                 createNamespaceRequest,
-                new UUID(0L, 0L) /* TODO UUID v7 */,
+                new UUID(116617318654508422L, -7820829973016961092L) /* UUID 
v7 */,
                 services.realmContext(),

Review Comment:
   The same hard-coded UUID v7 string is used via UUID.fromString(...) in 
several places in this test. Consider hoisting it into a static final UUID 
constant (for example, IDEMPOTENCY_KEY) to avoid duplication and repeated 
parsing.



-- 
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]

Reply via email to