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


##########
core/src/main/java/org/apache/iceberg/expressions/ExpressionParser.java:
##########
@@ -226,37 +265,99 @@ private void unboundLiteral(Object object) throws 
IOException {
         BigDecimal decimal = (BigDecimal) object;
         SingleValueParser.toJson(
             Types.DecimalType.of(decimal.precision(), decimal.scale()), 
decimal, gen);
+      } else {
+        throw new UnsupportedOperationException(
+            "Cannot write literal of unsupported type: " + 
object.getClass().getName());
       }
     }
 
     private String operationType(Expression.Operation op) {
       return op.toString().replace('_', '-').toLowerCase(Locale.ROOT);
     }
 
-    private void term(Term term) throws IOException {
-      if (term instanceof UnboundTransform) {
+    private void writeExpr(Term term) throws IOException {
+      if (term instanceof UnboundApply) {
+        writeApply((UnboundApply<?>) term);
+      } else if (term instanceof UnboundTransform) {

Review Comment:
   Shouldn't `UnboundTransform` be a subclass of `UnboundApply` so you don't 
need to handle it separately here?



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