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/24 20:27:19 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #6590: Python: Add sql command to the CLI

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


##########
python/pyiceberg/io/pyarrow.py:
##########
@@ -470,6 +472,59 @@ def expression_to_pyarrow(expr: BooleanExpression) -> pc.Expression:
     return boolean_expression_visit(expr, _ConvertToArrowExpression())
 
 
+def open_task(
+    task: FileScanTask,
+    fs: FileSystem,
+    table: Table,
+    row_filter: BooleanExpression,
+    projected_schema: Schema,
+    case_sensitive: bool,
+) -> pa.Table:
+    _, path = PyArrowFileIO.parse_location(task.file.file_path)
+
+    bound_row_filter = bind(table.schema(), row_filter, case_sensitive=case_sensitive)

Review Comment:
   This was to make `open_task` something that outside libraries could use. If we require a bound expression then I think that makes this harder for people to reuse. I'm fine with it as an internal method though.



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