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

Class reader

python/pyarrow/tests/test_dataset.py:297–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295 use_threads = request.param
296
297 class reader:
298
299 def __init__(self):
300 self.use_threads = use_threads
301
302 def _patch_kwargs(self, kwargs):
303 if 'use_threads' in kwargs:
304 raise Exception(
305 ('Invalid use of dataset_reader, do not specify'
306 ' use_threads'))
307 kwargs['use_threads'] = use_threads
308
309 def to_table(self, dataset, **kwargs):
310 self._patch_kwargs(kwargs)
311 return dataset.to_table(**kwargs)
312
313 def to_batches(self, dataset, **kwargs):
314 self._patch_kwargs(kwargs)
315 return dataset.to_batches(**kwargs)
316
317 def scanner(self, dataset, **kwargs):
318 self._patch_kwargs(kwargs)
319 return dataset.scanner(**kwargs)
320
321 def head(self, dataset, num_rows, **kwargs):
322 self._patch_kwargs(kwargs)
323 return dataset.head(num_rows, **kwargs)
324
325 def take(self, dataset, indices, **kwargs):
326 self._patch_kwargs(kwargs)
327 return dataset.take(indices, **kwargs)
328
329 def count_rows(self, dataset, **kwargs):
330 self._patch_kwargs(kwargs)
331 return dataset.count_rows(**kwargs)
332
333 return reader()
334

Callers 5

dataset_readerFunction · 0.85
table_test.ccFile · 0.85
GetSchemaMethod · 0.85
GetNextMethod · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 2

dataset_readerFunction · 0.68
TESTFunction · 0.68