rdblue commented on a change in pull request #686: Add transform expressions
URL: https://github.com/apache/incubator-iceberg/pull/686#discussion_r355089364
 
 

 ##########
 File path: api/src/main/java/org/apache/iceberg/expressions/BoundPredicate.java
 ##########
 @@ -20,18 +20,35 @@
 package org.apache.iceberg.expressions;
 
 import org.apache.iceberg.StructLike;
+import org.apache.iceberg.types.Type;
+import org.apache.iceberg.types.Types;
 
-public abstract class BoundPredicate<T> extends Predicate<BoundReference<T>> {
-  protected BoundPredicate(Operation op, BoundReference<T> ref) {
-    super(op, ref);
+public abstract class BoundPredicate<T> extends Predicate<T, Bound<T>> 
implements Bound<Boolean> {
 
 Review comment:
   Yeah, the original `Expression` interface is really a boolean expression. I 
didn't use "predicate" because boolean expressions include things like `true` 
and `and`.
   
   But the point that we may want to clean this up is valid. I was thinking 
that it would make more sense if `ValueExpression` were called `Expression` - 
something that produces a value. Then `BooleanExpression` could be a 
`ValueExpression<Boolean>`. We'd need to remove the `ref` from the current 
`ValueExpression` and this would be a breaking API change.
   
   Right now, `Bound` and `Unbound` extend only `ValueExpression` because 
`ValueExpression` has a reference. But `Bound` and `Unbound` could carry the 
reference instead.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to