Repository navigation
fix: preserve BIT values when loading JSONLINE - #32759
Conversation
A JSONLINE numeric field loaded into BIT previously reached the BIT consumer as raw digit bytes (e.g. 1 became 0x31/49), rejected narrow values and mishandled high magnitudes such as 2^53+1. Keep the canonical unsigned integer JSON NUMBER kind and value for object and array containers through both the direct and staged varchar->BIT consumers, apply the JSON NULLIF against the raw field before conversion, and keep zero, narrow BIT and 2^53+1..UINT64_MAX exact. Quoted values, raw text, NULL, CSV and Kafka byte behavior are unchanged; JSONLINE OUTFILE export already emits canonical numbers. The remaining CSV half of the issue was fixed separately (matrixorigin#30655). Fixes matrixorigin#30653
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? |
|
Queue requested — the merge queue status continues in this comment ↓. |
|
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: 5b4aae1329572226815ebb2d588f11d699ec4cef
Assessment: approve
The fix preserves exact numeric JSONLINE BIT values through both existing consumers while retaining raw NULLIF, string, CSV and Kafka semantics. The bounded provenance conversion adds little complexity. No actionable defects remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed the complete delta, relevant consumers, linked issue history and all three discussion entries; saved discussion-assessment.json.
-
Reused frozen-head successful UT, SCA, Compose PROXY BVT and COMPOSE PESSIMISTIC BVT evidence.
-
Local isolated helper probe passed 62,001 values across BIT widths 1–64 plus rejection controls; retained lexeme-probe.log.
-
Source/fixture audit passed all 12 artifacts, gzip identity, 36 SQL statements, 10 result tables and metadata. Four local receipts and logs are matched in validation-reconciliation.json.
Limitations:
-
Native packages and service BVT were not rerun locally; installed Go 1.26.6 is below the required 1.27.1. Native validation relies on frozen CI and attributed author reports; raw author logs were not supplied.
-
Public coverage uses small serial and compressed inputs; staged parallel conversion is covered by native unit tests.
✅ Merged into
|
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #30653
What this PR does / why we need it:
Loading numeric JSONLINE fields into BIT previously interpreted the decimal digits as raw bytes: 1 became 49, and narrow or large values could not reload correctly. This completes the JSONLINE half of #30653; the CSV half was fixed in #30655.
Validation:
make static-check-selected STATIC_CHECK_PACKAGES="./pkg/sql/util/csvparser ./pkg/sql/colexec/external"passed with 0 issues.method=runwith full metadata: 36/36 SQL statements passed, error.txt was empty, and the console contained no hidden SQLException. Independent byte/JSON-kind checks verified both BIT JSONLINE exports, including saved query results, followed by successful reloads.