You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "c21 (via GitHub)" <gi...@apache.org> on 2023/03/22 00:09:53 UTC

[GitHub] [iceberg] c21 commented on a diff in pull request #7148: Python: Add conversion from iceberg table scan to ray dataset

c21 commented on code in PR #7148:
URL: https://github.com/apache/iceberg/pull/7148#discussion_r1144104340


##########
python/pyiceberg/table/__init__.py:
##########
@@ -415,3 +416,8 @@ def to_duckdb(self, table_name: str, connection: Optional[DuckDBPyConnection] =
         con.register(table_name, self.to_arrow())
 
         return con
+
+    def to_ray(self) -> ray.data.dataset.Dataset:
+        import ray
+
+        return ray.data.from_arrow(self.to_arrow())

Review Comment:
   just for my understanding, would `self.to_arrow()` returns a `pa.Table` has all rows from Iceberg table? So that would assume the table is very small to fit in the memory of Python client, right? What if the table is larger than the available memory?



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