You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "fallintoplace (via GitHub)" <gi...@apache.org> on 2026/08/04 20:53:30 UTC
[PR] fix(table): advance string upper bounds across surrogate gap [iceberg-go]
fallintoplace opened a new pull request, #1645:
URL: https://github.com/apache/iceberg-go/pull/1645
## What changed\n\nAdvance truncated string upper bounds from U+D7FF to U+E000 instead of treating the surrogate range as a terminal value.\n\n## Why\n\nU+D800 through U+DFFF are invalid Unicode scalar values. The previous increment logic stopped at U+D7FF and returned no upper bound, even though U+E000 is the next valid scalar value.\n\n## Testing\n\n- Added the U+D7FF regression test\n- ok github.com/apache/iceberg-go/table/internal (cached)\n- ok github.com/apache/iceberg-go/table (cached)
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(table): advance string upper bounds across surrogate gap [iceberg-go]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #1645:
URL: https://github.com/apache/iceberg-go/pull/1645
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(table): advance string upper bounds across surrogate gap [iceberg-go]
Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #1645:
URL: https://github.com/apache/iceberg-go/pull/1645#discussion_r3732154695
##########
table/internal/utils.go:
##########
@@ -538,8 +538,7 @@ func TruncateUpperBoundText(s string, trunc int) string {
result := []rune(s)[:trunc]
for i := len(result) - 1; i >= 0; i-- {
- next := result[i] + 1
- if utf8.ValidRune(next) {
+ if next, ok := nextValidRune(result[i]); ok {
result[i] = next
return string(result)
Review Comment:
Non-blocking: after carrying past one or more trailing U+10FFFF runes, consider returning `string(result[:i+1])` here. Retaining the trailing maximum runes produces a safe but looser upper bound; returning through the rune that was actually incremented gives the tighter prefix bound.
##########
table/internal/utils_test.go:
##########
@@ -67,6 +67,7 @@ func TestMetricsModePairs(t *testing.T) {
func TestTruncateUpperBoundString(t *testing.T) {
assert.Equal(t, "ab", internal.TruncateUpperBoundText("aaaa", 2))
+ assert.Equal(t, "\uE000", internal.TruncateUpperBoundText("\uD7FFx", 1))
Review Comment:
Non-blocking: consider asserting `utf8.ValidString` and bytewise ordering for the returned bound, since those are the two correctness properties behind this regression. Neighboring scalar values and a preceding-rune carry case would round out the boundary coverage.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org