rdblue commented on code in PR #18629:
URL: https://github.com/apache/iceberg/pull/18629#discussion_r4745387360


##########
api/src/main/java/org/apache/iceberg/expressions/Expression.java:
##########
@@ -124,7 +124,10 @@ public Operation flipLR() {
   }
 
   /** Returns the operation for an expression node. */
-  Operation op();
+  default Operation op() {

Review Comment:
   What is the downside to having an op for expression types? The addition of 
an `APPLY` operation makes sense to me, and I don't think it would be confusing 
to have `ID_REF`, `NAMED_REF`, and `LITERAL` as well.
   
   The operation here allows us to collapse implementations into the same class 
(for instance, `Predicate` with multiple operations) and to be able to dispatch 
calls in visitors without going through a series of `instanceof` checks. Those 
uses are still valid so I don't think I would make this change.



-- 
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]

Reply via email to