kylebarron commented on code in PR #3447:
URL: https://github.com/apache/iceberg-python/pull/3447#discussion_r4185673570
##########
pyiceberg/table/__init__.py:
##########
@@ -1778,6 +1777,10 @@ def __datafusion_table_provider__(self, session: Any |
None = None) -> IcebergDa
).__datafusion_table_provider__
return provider(session)
+ def __arrow_c_stream__(self, requested_schema: object | None = None) ->
object:
+ """Export this Table as an Arrow C stream (PyCapsule interface)."""
+ return
self.scan().to_arrow_batch_reader().__arrow_c_stream__(requested_schema)
Review Comment:
I think one other possible option is to not define `__arrow_c_stream__` _on
the `Table` itself_, but rather to only define it on the output of
`self.scan()`.
So the user would have to call `self.scan()` themselves but would make it
explicit that they want to materialize the underlying data.
--
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]