github-actions[bot] commented on code in PR #68113:
URL: https://github.com/apache/doris/pull/68113#discussion_r4033283514


##########
regression-test/data/query_p0/sql_functions/window_functions/test_window_float_sliding_frame.out:
##########
@@ -0,0 +1,66 @@
+-- This file is automatically generated. You should know what you did if you 
want to edit this
+-- !avg_double_preceding_1 --
+1      1.8014398509481984e+16  1.8014398509481984e+16
+2      1       9007199254740992
+3      1       1
+4      1       1
+
+-- !sum_double_preceding_1 --
+1      1.8014398509481984e+16  1.8014398509481984e+16
+2      1       1.8014398509481984e+16
+3      1       2
+4      1       2
+
+-- !avg_sum_float_preceding_1 --
+1      1.6777216E7     16777216        16777216
+2      1.0     8388608.5       16777217
+3      1.0     1       2
+4      1.0     1       2
+
+-- !avg_sum_double_sign_flip --
+5      1.8014398509481984e+16  1.8014398509481984e+16  1.8014398509481984e+16
+6      1       9007199254740992        1.8014398509481984e+16
+7      -1.8014398509481984e+16 0       0

Review Comment:
   [P2] Avoid pinning a reassociation-dependent result
   
   This frame is `[2^54, 1, -2^54]`. The recorded `0` assumes left-to-right 
addition, but the equally legal grouping `(2^54 + -2^54) + 1` yields `1` (and 
AVG yields `1/3`). Both SUM and AVG mark their additions with 
`ALLOW_FP_REASSOCIATION`; [Clang's 
contract](https://clang.llvm.org/docs/LanguageExtensions.html#extensions-to-specify-floating-point-flags)
 permits reassociation across statements. `order_qt` fixes row order, not the 
compiler's grouping, so this exact output can fail after a supported 
compiler/target/codegen change even when the implementation is correct. Please 
remove this sign-cancellation assertion or use association-invariant values; 
the direct outgoing-row cases already cover the reported bug.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to