rdblue commented on a change in pull request #4021:
URL: https://github.com/apache/iceberg/pull/4021#discussion_r800240679



##########
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'm a bit surprised that `tell` was required for read, but not for 
write... in the JVM implementation we only need the position in the write path, 
not the read path. Maybe that's tracked internally by the Arrow Parquet writer, 
though. (@xhochy might know)




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

Reply via email to