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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to