ShivamSharma43 commented on issue #2063:
URL: https://github.com/apache/iceberg-go/issues/2063#issuecomment-6577062753

   Following up on @subhramit's note: I can confirm this is fixed on `main`, 
and the fix shipped in v0.7.0. The report is against v0.6.0.
   
   - `TruncateTransform` truncates strings by code point now, through 
`truncateString` in `transforms.go`. That came from #1198 (keep UTF-8 intact) 
and #1223 (truncate by code points, matching Java). `git tag --contains` puts 
both commits in `v0.7.0-rc0` / `v0.7.0`, and neither is in v0.6.0.
   - The lower-bound writer path from the report, `statsAggregator.MinAsBytes` 
in `table/internal/utils.go`, still calls `TruncateTransform.Apply`, so it gets 
the fix too.
   - I ran the value from the report through `TruncateTransform{Width: 16}` on 
`main` (b354505). `"POSKOTA.CO.ID … Jakarta"` gives `"POSKOTA.CO.ID … "`: 16 
code points, 18 bytes (`504f534b4f54412e434f2e494420e280a620`), valid UTF-8. 
The `…` (`e2 80 a6`) stays whole, where v0.6.0 left a trailing partial `e2 80`.
   - The existing tests `TestTruncateTransformStringUnicode` and 
`TestTruncateStringDoesNotSplitUTF8` pass on `main`.
   
   @myxzlpltk, upgrading to v0.7.0 should stop new writes from producing 
invalid bounds. Upgrading won't repair manifests that v0.6.0 already wrote, 
though.
   
   Unless there's another write path I've missed, I think this issue can be 
closed.
   


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