kennknowles commented on code in PR #31486:
URL: https://github.com/apache/beam/pull/31486#discussion_r1687057600


##########
sdks/java/io/google-cloud-platform/expansion-service/build.gradle:
##########
@@ -36,6 +36,9 @@ dependencies {
     permitUnusedDeclared project(":sdks:java:io:google-cloud-platform") // 
BEAM-11761
     implementation project(":sdks:java:extensions:schemaio-expansion-service")
     permitUnusedDeclared 
project(":sdks:java:extensions:schemaio-expansion-service") // BEAM-11761
+    implementation project(":sdks:java:managed")
+    permitUnusedDeclared project(":sdks:java:managed") // BEAM-11761

Review Comment:
   Notes, no action required on this PR:
   
    - This is a link to Jira, so probably there's a github issue it is migrated 
to
    - This should be equivalent to `runtimeOnly` because it is "implementation" 
but no static references to it. I would guess this works the same, or else the 
uberjar plugin might not treat it right.
    - Putting these deps into a docker container without making an uber jar 
would honestly be better in the case where it _does_ end up in a container, so 
we keep the original jar metadata.



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryStorageWriteApiSchemaTransformProvider.java:
##########
@@ -169,21 +156,27 @@ public void validate() {
       }
 
       // validate create and write dispositions
-      if (!Strings.isNullOrEmpty(this.getCreateDisposition())) {
-        checkNotNull(
-            CREATE_DISPOSITIONS.get(this.getCreateDisposition().toUpperCase()),
-            invalidConfigMessage
-                + "Invalid create disposition (%s) was specified. Available 
dispositions are: %s",
-            this.getCreateDisposition(),
-            CREATE_DISPOSITIONS.keySet());
+      if (!Strings.isNullOrEmpty(getCreateDisposition())) {
+        List<String> createDispostions =
+            Arrays.stream(CreateDisposition.values())
+                .map(c -> c.name())
+                .collect(Collectors.toList());
+        Preconditions.checkArgument(
+            createDispostions.contains(getCreateDisposition().toUpperCase()),
+            "Invalid create disposition (%s) was specified. Available 
dispositions are: %s",
+            getCreateDisposition(),
+            createDispostions);

Review Comment:
   typo `dispositions`



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