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


##########
python/pyiceberg/table/__init__.py:
##########
@@ -183,14 +185,17 @@ class TableScan(Generic[S], ABC):
     def __init__(
         self,
         table: Table,
-        row_filter: Optional[BooleanExpression] = None,
+        row_filter: Optional[Union[str, BooleanExpression]] = None,
         selected_fields: Tuple[str] = ("*",),
         case_sensitive: bool = True,
         snapshot_id: Optional[int] = None,
         options: Properties = EMPTY_DICT,
     ):
         self.table = table
-        self.row_filter = row_filter or AlwaysTrue()
+        if row_filter is None:
+            self.row_filter = AlwaysTrue()
+        else:

Review Comment:
   We also do the same logic in the `filter()` method below, therefore I added 
it to the parse. But I agree, it will clutter up the parse method in the long 
run.



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