findepi commented on code in PR #5908:
URL: https://github.com/apache/iceberg/pull/5908#discussion_r1933444518
##########
api/src/main/java/org/apache/iceberg/expressions/ExpressionUtil.java:
##########
@@ -258,6 +270,23 @@ public <T> String predicate(UnboundPredicate<T> pred) {
}
}
+ private static <T> List<String> abbreviateValues(List<String>
sanitizedValues) {
+ if (sanitizedValues.size() >= LONG_IN_PREDICATE_ABBREVIATION_THRESHOLD) {
+ Set<String> distinctValues = ImmutableSet.copyOf(sanitizedValues);
+ if (distinctValues.size()
+ <= sanitizedValues.size() - LONG_IN_PREDICATE_ABBREVIATION_MIN_GAIN)
{
Review Comment:
> Can we make this simpler and just print first 2 and last distinct
sanitized values when the number of distinctValues exceeds some threshold ?
yes! (or a few more)
--
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]