nzw921rx commented on PR #12337: URL: https://github.com/apache/seatunnel/pull/12337#issuecomment-6470250687
Thanks for the fix. I reviewed head `27727ce633239f72f1fb73f2a28254da8370ea2c` and found no blocking issues. ### Correctness and scope The fix addresses the arithmetic at the correct boundary: widening an operand **before** multiplication or subtraction prevents the intermediate operation from overflowing or underflowing in float precision. All six affected functions are updated consistently in both Zeta SQL and Calcite: - `VECTOR_NORM` - `INNER_PRODUCT` - `COSINE_DISTANCE` - `L1_DISTANCE` - `L2_DISTANCE` - `VECTOR_NORMALIZE` The production changes introduce no mutable shared state or input mutation. Return types, configuration, schemas and checkpoint/state formats remain unchanged. ### Local validation The PR was merged locally with dev `c8e7896157c6e003a5d7f7f5038de043a4de2ac5` without conflicts. | Validation | Result | |---|---| | Compile and install the 11-module dependency reactor | Passed | | Complete transforms-v2 unit suite on Java 17.0.20 | 1,879 tests passed; zero failures, errors or skips | | Complete transforms-v2 unit suite on Java 11.0.29 | 1,879 tests passed; zero failures, errors or skips | | Run 20 focused regression cases against the fixed implementation | 20/20 passed | | Run the same cases with the seven original dev production classes loaded through a separate classpath overlay | 18 failed, reproducing the original behavior | | Restore the fixed implementation and repeat those cases | 20/20 passed | The regression cases cover large and tiny finite operands, minimum normal and subnormal values, cancellation of large products, ordinary decimal values, zero/empty vectors, null inputs and non-finite values. They also exercise actual SQL and Calcite query evaluation. ### Compatibility and CI This is a numerical behavior correction: ordinary inputs can also produce different low-order digits because intermediate operations retain greater precision. The bilingual documentation describes this change. Normalized output elements remain float, so output rounding and underflow remain possible. The exact-head [Build](https://github.com/apache/seatunnel/runs/121073007585) and the relevant Transform E2E jobs passed. The E2E results were verified in CI; container E2E tests were not rerun locally. LGTM. -- 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]
