MCPcopy Create free account
hub / github.com/apache/arrow / DuckReader

Class DuckReader

python/pyarrow/tests/test_io.py:224–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222 dst_buf = bytearray(data)
223
224 class DuckReader:
225 def close(self):
226 pass
227
228 @property
229 def closed(self):
230 return False
231
232 def read_buffer(self, nbytes):
233 assert nbytes == length
234 return memoryview(dst_buf)[:nbytes]
235
236 duck_reader = DuckReader()
237 with pa.PythonFile(duck_reader, mode='r') as f:

Callers 2

Calls

no outgoing calls

Tested by 2