Repository navigation
Conversation
… warnings
An explicit CAST of numeric-prefix text to SIGNED/UNSIGNED returned the right
value and warning code but described the conversion as DOUBLE
("Truncated incorrect DOUBLE value"). MySQL names it INTEGER. Implicit
numeric coercion keeps DOUBLE.
Fixes matrixorigin#31443
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: 1b9395d2c948e857d8d9bdd0b71ec267f6ecf788
Assessment: approve
The fix correctly names INTEGER in explicit text-to-integer cast warnings while preserving values, warning codes, and other conversion paths. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a1869d-999c-7481-b340-ae4a63e8cee4 · slot 1 · generation 2
Validation:
-
Reviewed the complete delta, affected owners and consumers, linked issue, and all discussion items.
-
Isolation preflight and 11 focused cast/diagnostic tests passed.
-
The new regression test failed as expected against a merge-base implementation overlay, reproducing the old DOUBLE message.
-
Supplied exact-head CI reports successful UT, static analysis, and both distributed BVT groups.
-
Verified receipts against retained logs, native-input provenance, discussion coverage, and unchanged source. Evidence recorded in validation-summary.json.
Limitations:
-
Full UT and distributed BVT rely on supplied CI results; raw external logs were unavailable.
-
No fresh MySQL comparison was run; the supplied linked issue provides the diagnostic oracle.
|
Queued — the merge queue status continues in this comment ↓. |
aunjgr
left a comment
There was a problem hiding this comment.
Reviewed the explicit and implicit integer-conversion warning paths and their SQL regression coverage.
🚫 Left the queue1 h 20 min in the queue, with no time running CI. So far
Reason Pull request #31844 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.
Hint You 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. Tick the box to put this pull request back in the merge queue (same as
Times in UTC · dashboard · how the merge queue works |
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #31443
What this PR does / why we need it:
SELECT CAST('42tail' AS SIGNED); SHOW WARNINGS;returned42and warning code 1292, but the message saidTruncated incorrect DOUBLE value: '42tail'. MySQL 8.0 saysTruncated incorrect INTEGER value: '42tail'for an explicitCAST(... AS SIGNED/UNSIGNED).Cause:
strToSignedWithProc/strToUnsignedWithProcused the shared numeric-coercion warning helper, which always namesDOUBLE.Fix (
func_cast.go+17/-3): the helper takes the type name; explicit integer casts passINTEGER, implicit coercion keepsDOUBLE. Value, warning code and the other warning paths are unchanged.Tests
cast_integer_warning_test.go: explicit cast of'42tail'to BIGINT and BIGINT UNSIGNED gives 42 and the INTEGER message. RED on main (DOUBLEmessage), GREEN here.go test ./pkg/sql/plan/function/...passes.function/cast_text_integer_warning.sql: main 7/10, PR 10/10.functionsame failures (foreign_exttab 2, table_func_table_changes 14, local env),dtype0,expression0,prepare0. No existing golden changes.Merge Danger
Low. Warning text only.