nssalian opened a new pull request, #17342: URL: https://github.com/apache/iceberg/pull/17342
## Rationale for the change Follow-up to https://github.com/apache/iceberg/pull/16880 and https://github.com/apache/iceberg-go/pull/1478 (where it was fixed in `iceberg-go` so opening this to match the implementations). ## Changes - Pass `truncateLength(mode)` into `MetricsVariantVisitor` and `VariantMetrics`; `truncate(N)` clips to N, `full` leaves bounds untruncated, default `truncate(16)` unchanged. - Add a bound construction condition on `truncateLength > 0`. Without this a shredded string under `counts` reaches a length-0 truncation and `UnicodeUtil.truncateString` throws. Not a correctness bug - variant is excluded from `tight_bounds`. ## Tests - `TestVariantMetrics` covers (string/binary) x (truncate(8)/full/counts). -- 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]
