amogh-jahagirdar commented on code in PR #6657: URL: https://github.com/apache/iceberg/pull/6657#discussion_r1090014264
########## 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: Nit: Maybe we could use a ternary operator here? ``` self.row_filter = parser.parse(row_filter) if row_filter else AlwaysTrue() ``` -- 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