DanielCarter-stack commented on issue #10405:
URL: https://github.com/apache/seatunnel/issues/10405#issuecomment-3809059605

   <!-- code-pr-reviewer -->
   @zoucx 
   
   Thanks for the report. Based on your Avro schema, all fields are union types 
(e.g., `["string", "null"]`), but your SeaTunnel config defines them as 
non-nullable types (`string`, `int`, `bigint`). This mismatch likely causes the 
deserialization failure when Kafka messages contain null values.
   
   Current implementation builds the Avro schema from your SeaTunnel config 
rather than reading the actual schema from Kafka messages. See:
   - 
`seatunnel-formats/seatunnel-format-avro/src/main/java/org/apache/seatunnel/format/avro/AvroToRowConverter.java:50-51`
   - 
`seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceConfig.java:407-408`
   
   To resolve:
   1. **Confirm field nullability**: Does your data actually contain null 
values in any fields?
   2. **Adjust schema definition**: Check the docs for declaring nullable 
fields in SeaTunnel schema syntax (see `docs/zh/connectors/formats/avro.md`).
   3. **Provide full stack trace**: The WARN log alone is insufficient—please 
share the complete exception stack trace.
   
   Could you also share how Flink is configured to handle the same Avro schema 
successfully?


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