jun-he commented on a change in pull request #357: Add in and not in predicates
URL: https://github.com/apache/incubator-iceberg/pull/357#discussion_r313221613
##########
File path: api/src/main/java/org/apache/iceberg/expressions/Predicate.java
##########
@@ -19,15 +19,44 @@
package org.apache.iceberg.expressions;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableSet;
+import java.util.Collection;
+import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
public abstract class Predicate<T, R extends Reference> implements Expression {
private final Operation op;
private final R ref;
private final Literal<T> literal;
+ private final Set<Literal<T>> literalSet;
Review comment:
Thanks for the review!
Yeah, I agree that it is better to have two classes for bound predicate as
it will only be generated as expression during binding.
For `UnboundPredicate` and `Predicate`, I still think it might be good to be
a single class. For example, `UnboundPredicate` for `IN` predicate with a
single item should return an `EQ` predicate. The separation will complicate it.
Please let me know your comments. Thanks.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]