rdblue commented on a change in pull request #4021:
URL: https://github.com/apache/iceberg/pull/4021#discussion_r800217243
##########
File path: python/src/iceberg/io/base.py
##########
@@ -24,7 +24,40 @@
"""
from abc import ABC, abstractmethod
-from typing import Union
+from typing import Protocol, Union, runtime_checkable
+
+
+@runtime_checkable
+class InputStream(Protocol):
+ def read(self, n: int) -> bytes:
+ ...
Review comment:
I agree that the protocol is the right approach. You should be able to
use anything, as long as Arrow can use it to read or write a file. The question
is then what that protocol needs to validate. I think for that we just need to
try it out until we have a minimal set of functions. Or maybe an Arrow expert
can help us out.
--
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]