Repository navigation
Patch 0.11.3 - #3474
Patch 0.11.3#3474
Conversation
…-trim-trailing-nuls [jdbc-v2] Cut FixedString text after the last valid UTF-8 character in getString and getObject (cherry picked from commit 15bb710)
|
@polyglotAI-bot please review if this change is the exact backport of the #3427 |
|
No defects found in the supplied Final verdict✅ Approve Automated static review (no build or test run) by Polyglot AI (gpt-6-astra) of |
polyglotAI-bot
left a comment
There was a problem hiding this comment.
Review of aa83bfd posted: see the summary comment and the inline threads.
Summary
back port of the fix #3288
Note
Medium Risk
This is a documented breaking change to jdbc-v2 ResultSet string behavior for FixedString columns; callers that relied on padded text or manual null trimming may need to switch to byte accessors or update expectations.
Overview
0.11.3 backports the fix for issue #3288: jdbc-v2 now trims FixedString text when you read it as a
StringviaResultSet#getString(...)orResultSet#getObject(...)(when the result is aString). A newtrimFixedStringhelper inResultSetImplstrips trailing zero padding (\0) and trailing replacement characters (U+FFFD) after UTF-8 decode, so values liketoFixedString('Dario', 10)return"Dario"instead of padded text—relevant for tools such as Tableau that surface the old padding.Binary read paths are unchanged:
getBytes,getBinaryStream, andgetObject(..., byte[].class)still return allNbytes. Scope is top-levelFixedStringcolumns only (not nested types or plainStringcolumns). Docs (jdbc.mdx,features.md,history/latest/3288.md) and integration tests inJdbcDataTypeTestsdocument and lock in the behavior; version/revision bumps are mechanical across the repo.Reviewed by Cursor Bugbot for commit 6117237. Bugbot is set up for automated code reviews on this repo. Configure here.