goutamadwant opened a new pull request, #12337:
URL: https://github.com/apache/seatunnel/pull/12337

   <!-- PR title: [Fix][Transform-V2] Widen vector operands before arithmetic 
-->
   
   ### Purpose of this pull request
   
   Closes #12336.
   
   Widen float operands before intermediate products and differences in six SQL 
vector functions and their equivalent Calcite UDFs. The existing double 
accumulators and return types are retained.
   
   Extend existing function/SQL tests, both E2E fixtures, EN/ZH function 
documentation and the incompatible-changes pages.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Finite vectors no longer produce incorrect infinity, NaN or zero merely 
because an intermediate float operation overflows or underflows. Results, 
including low-order digits, can change; review thresholds and previously 
computed vector metrics before replaying data.
   
   No API, configuration, schema, dependency or state-format changes. NULL and 
actual zero handling remain in place. Normalized output remains float. No 
nonfinite validation policy is added, but corrected finite intermediates can 
affect mixed nonfinite results; the tiny-vector/infinity cosine case is 
documented and tested. Random projection is unchanged. Reproduced on current 
dev; released versions were not separately tested.
   
   ### How was this patch tested?
   
   - Unchanged-production regressions on Java 8/11: seven failures in the 
28-test SQL group and seven in the 40-test Calcite UDF group on each JDK.
   - Full transform reactor on Java 8/11: 1,177 transform tests passed per JDK, 
with no failures, errors or skips.
   - Independent BigDecimal/Math.hypot references; huge, tiny, subnormal, 
ordinary, cancellation, NULL, zero and nonfinite cases.
   - Combined affected-suite validation with the read-side fix passed on both 
JDKs. Actual Java 11 Zeta SQL/Calcite jobs failed the arithmetic checks with 
the original JAR and passed with the combined fixed JAR. This used an earlier 
snapshot distribution with the new transform JAR overlaid, not the full 
Flink/Spark matrix.
   - Root Spotless and Java 11 root verification passed on the combined 
integration tree, including distribution packaging.
   
   ```sh
   ./mvnw -B -pl seatunnel-transforms-v2 -am package -Dskip.ui=true
   ./mvnw spotless:apply
   ./mvnw -q -DskipTests verify
   ```
   
   ### Check list
   
   * [x] New Jar binary package / [license 
notice](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md):
 not applicable; no dependency added.
   * [x] User-facing documentation updated in EN/ZH.
   * [x] Incompatible-changes pages updated with numerical behavior changes and 
migration guidance.
   * [x] Connector checklist (plugin mapping, distribution POM, CI labels, 
connector E2E and plugin_config): not applicable; no connector code changed. 
Existing SQL and Calcite E2E fixtures were extended.
   


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