JacobZheng0927 opened a new pull request, #13139: URL: https://github.com/apache/seatunnel/pull/13139
### Purpose of this pull request Yes, I am contributing to Apache SeaTunnel. Closes #13138. The shared Arrow reader can emit a Java `Boolean` for a field declared as `TINYINT`. Downstream components expect a `Byte`, so a native StarRocks source followed by a JDBC sink fails with `Boolean cannot be cast to Byte`, including when the destination column is also `TINYINT`. Normalize boolean values to byte `0`/`1` only when the declared SeaTunnel type is `TINYINT`. Preserve nulls, native `BOOLEAN` values, and numeric `TINYINT` values. Add regression coverage and document the source-schema behavior in English and Chinese. ### Does this PR introduce _any_ user-facing change? Yes. Arrow boolean values declared as `TINYINT` now produce `Byte` values (`false -> 0`, `true -> 1`) instead of failing downstream type casts. No public API or configuration changes are required. ### How was this patch tested? - The new Arrow IPC regression fails before the fix and passes afterward. All 17 `connector-common` unit tests pass, including boolean, null, numeric byte boundary, multi-batch, and resource-close coverage. - [Real StarRocks E2E on Linux x86](https://github.com/JacobZheng0927/seatunnel/actions/runs/41972221538), using StarRocks 2.2.1 and Zeta: the same test fails before the fix with the Boolean-to-Byte `ClassCastException`; after the fix, 1 test passes with 0 skipped. It reads `false`, `true`, and `null` through the native source with a `TINYINT` schema, writes through JDBC to a `TINYINT` column, and asserts exactly `0`, `1`, and SQL `NULL` in the destination. - Scoped Spotless formatting and Maven `verify -DskipTests` pass. The E2E module now depends on the existing JDBC connector for this test. To run the integration test after building its dependencies: ```sh RUN_ENGINES=zeta ./mvnw -pl :connector-starrocks-e2e -DskipUT=true -DskipIT=false -Dit.test=StarRocksIT#testStarRocksBooleanAsTinyInt verify ``` ### Check list - [x] Added unit regression coverage and extended the existing StarRocks E2E suite. - [x] Updated the English and Chinese source-schema documentation. - [x] No new third-party libraries or incompatible API/configuration 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]
