Repository navigation
fix: normalize signed zero in ABS - #30168
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: a579075a8abdc954e93bd08216fca6e602532b1f
Assessment: approve
Reviewed the complete five-file delta and scalar/array callers. Normalizing zero in the shared ABS helper is a coherent fix that preserves nonzero, NaN, infinity and integer-overflow behavior. It adds one comparison without new allocation or state. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a12d8f-8e48-7622-ad17-b605f08450ce · slot 1 · generation 0
Validation:
-
Full momath package passed using the supplied executor; preflight passed.
-
Base-implementation overlay failed specifically on the new float32/float64 negative-zero assertions, confirming regression sensitivity.
-
Reused frozen-head successful build, Ubuntu UT, Linux arm64 SCA and both BVT-group statuses; inspected test selection and SQL assertions.
-
Verified clean source and matched local commands, fingerprints, exit receipts and logs. Retained audit: /home/xupeng/.local/state/mo-bot/jobs/684fce95df42029126b2b429/attempt-1/review-evidence.json.
Limitations:
-
Broader array/SQL coverage relies on supplied CI evidence; raw CI logs and author-local receipts were unavailable. No performance benchmark was run.
-
The linked issue's full body was absent; its behavioral contract was assessed from the frozen PR description and regression case.
Merge Queue Status
This pull request spent 21 minutes 53 seconds in the queue, with no time running CI. ReasonPull request #30168 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR addresses:
What this PR does / why we need it:
Floating-point negative zero compares equal to zero, so the existing
v < 0check inAbsSignedpreserves its sign. Consequently,ATAN2(ABS(-0e0), -1e0)returns-PI()and a predicate comparing it toPI()loses a matching row.Return a positive zero at the shared ABS helper boundary for either zero representation. Scalar and array ABS use this correction. Existing nonzero arithmetic, NaN/Inf behavior, and signed-integer overflow handling are preserved. The change adds one scalar comparison, with no additional allocation.
Regression coverage explicitly checks zero sign bits for float32/float64 and array consumers, downstream ATAN2 results, floating boundaries, and signed-integer overflow. The existing SQL ABS case checks constant expressions, FLOAT/DOUBLE row predicates, and NULL propagation.
Validation (Go 1.27.1, macOS arm64):
CI has not run for this PR. The issue remains open for reporter verification after merge.