Fokko commented on code in PR #6657:
URL: https://github.com/apache/iceberg/pull/6657#discussion_r1093256954
##########
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:
+ self.row_filter = parser.parse(row_filter)
Review Comment:
Good suggestion, I've split it into a separate method for now, that also
takes care of the parsing.
--
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]