brucearctor commented on code in PR #28865:
URL: https://github.com/apache/beam/pull/28865#discussion_r1370959865


##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaReadSchemaTransformProvider.java:
##########
@@ -115,14 +115,10 @@ protected SchemaTransform 
from(KafkaReadSchemaTransformConfiguration configurati
 
     String format = configuration.getFormat();
 
-    if (format == null || format.isEmpty()) {
-      format = "raw";
-    }
-
-    if (format.equalsIgnoreCase("raw")) {
-      if (inputSchema != null && !inputSchema.isEmpty()) {
+    if (format != null && format.equals("RAW")) {
+      if (inputSchema != null) {
         throw new IllegalArgumentException(
-            "To read from Kafka in raw format, you can't provide a schema.");
+            "To read from Kafka in RAW format, you can't provide a schema.");

Review Comment:
   are there other error scenarios that we should include?  I'm trying to think 
about this one



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