zhangshenghang opened a new pull request, #12007: URL: https://github.com/apache/seatunnel/pull/12007
Closes #11935. ## What does this PR do? Adds TINYINT and SMALLINT support to Zeta SQL numeric functions: - ABS now preserves Byte and Short values and rejects their unrepresentable minimum values. - ROUND, CEIL, FLOOR, TRUNC, and TRUNCATE round TINYINT values instead of silently returning the input. TINYINT results that would overflow fail explicitly. - SIGN accepts Byte and Short values. - SIGN uses BigDecimal.signum() so very small DECIMAL values retain their sign. - Unsupported Number implementations now fail explicitly rather than being returned unchanged by the shared rounding helper. ## Tests - Added unit coverage for small integer values, boundary overflow, and exact BigDecimal sign handling. - Added an SQLTransform regression test covering ABS, SIGN, ROUND, CEIL, FLOOR, and TRUNC with TINYINT/SMALLINT columns. Validated with: ```text ./mvnw spotless:apply ./mvnw -pl seatunnel-transforms-v2 -Dtest=NumericFunctionTest,SQLNumericFunctionsTest test ./mvnw -q -DskipTests verify ``` -- 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]
