You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "rdblue (via GitHub)" <gi...@apache.org> on 2023/01/31 19:44:06 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #6657: Python: Allow to pass in a string as filter

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


##########
python/pyiceberg/expressions/parser.py:
##########
@@ -232,6 +233,9 @@ def handle_or(result: ParseResults) -> Or:
 ).set_name("expr")
 
 
-def parse(expr: str) -> BooleanExpression:
+def parse(expr: Union[str, BooleanExpression]) -> BooleanExpression:

Review Comment:
   I can see why you'd do this, but it seems better to make the caller check before calling `parse`. It's a bit confusing to accept an expression here and do nothing.



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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