Fokko commented on code in PR #65:
URL: https://github.com/apache/iceberg-python/pull/65#discussion_r1358122959


##########
pyiceberg/expressions/parser.py:
##########
@@ -233,10 +233,14 @@ def handle_not(result: ParseResults) -> Not:
 
 
 def handle_and(result: ParseResults) -> And:
+    if len(result[0]) > 2:
+        return And(result[0][0], result[0][1], *result[0][2:])
     return And(result[0][0], result[0][1])
 
 
 def handle_or(result: ParseResults) -> Or:
+    if len(result[0]) > 2:
+        return Or(result[0][0], result[0][1], *result[0][2:])
     return Or(result[0][0], result[0][1])

Review Comment:
   ```suggestion
       return Or(*result[0])
   ```



##########
pyiceberg/expressions/parser.py:
##########
@@ -233,10 +233,14 @@ def handle_not(result: ParseResults) -> Not:
 
 
 def handle_and(result: ParseResults) -> And:
+    if len(result[0]) > 2:
+        return And(result[0][0], result[0][1], *result[0][2:])
     return And(result[0][0], result[0][1])

Review Comment:
   What do you think of:
   ```suggestion
       return And(*result[0])
   ```



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