lh0156 opened a new pull request, #23055: URL: https://github.com/apache/kafka/pull/23055
## What `Values.parseString` no longer returns arrays or maps with missing inner schemas when it cannot infer a common schema. Instead, it falls back to the original literal as a `STRING` value. This also makes `SimpleHeaderConverter` safe for empty and heterogeneous containers because it relies on `Values.parseString`. ## Why Connect arrays and maps require inner schemas for validation. Returning a container with a null inner schema creates a `SchemaAndValue` that fails later in `ConnectSchema.validateValue`, for example when used as a struct field value. Falling back to the original string preserves the input without manufacturing an invalid Connect value. ## Testing - Added RED tests for heterogeneous arrays, nested containers, heterogeneous map values, and header conversion. - Added a regression test that validates the returned `SchemaAndValue` with `ConnectSchema.validateValue`. - `./gradlew :connect:api:test :connect:api:spotlessCheck :connect:api:checkstyleMain :connect:api:checkstyleTest :connect:api:spotbugsMain --no-build-cache --console=plain` - `./gradlew :connect:transforms:test :connect:api:spotlessCheck :connect:api:checkstyleMain :connect:api:checkstyleTest :connect:api:spotbugsMain --no-build-cache --console=plain` JIRA: https://issues.apache.org/jira/browse/KAFKA-16870 -- 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]
