atharvaHJoshi opened a new pull request, #23774:
URL: https://github.com/apache/kafka/pull/23774

   SetSchemaMetadata#apply unconditionally calls Schema#fields(), which throws 
a DataException for any schema that is not a STRUCT. Consequently the SMT fails 
on Avro/Connect primitive schemas (and also on array and map schemas), even 
though setting only the schema name/version does not require struct fields.
   
   This change copies the fields only when the schema type is STRUCT, mirroring 
the existing handling of keySchema/valueSchema for map and array types.
   
   ### Testing
   - ./gradlew :connect:transforms:test --tests 
"org.apache.kafka.connect.transforms.SetSchemaMetadataTest" (added coverage for 
primitive, primitive with null value, array and map schemas)
   - ./gradlew :connect:transforms:spotlessCheck 
:connect:transforms:checkstyleMain :connect:transforms:checkstyleTest
   
   Generated-by: opencode (big-pickle)


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