ffernandez92 commented on code in PR #29160:
URL: https://github.com/apache/beam/pull/29160#discussion_r1377360216
##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaWriteSchemaTransformProvider.java:
##########
@@ -131,10 +134,18 @@ public void finish() {
@Override
public PCollectionRowTuple expand(PCollectionRowTuple input) {
Schema inputSchema = input.get("input").getSchema();
- final SerializableFunction<Row, byte[]> toBytesFn =
- configuration.getFormat().equals("JSON")
- ? JsonUtils.getRowToJsonBytesFunction(inputSchema)
- : AvroUtils.getRowToAvroBytesFunction(inputSchema);
+ final SerializableFunction<Row, byte[]> toBytesFn;
+ if (configuration.getFormat().equals("RAW")) {
+ if (!inputSchema.hasField(PAYLOAD)) {
Review Comment:
Yep, you're right. I pushed the necessary changes
--
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]