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

Class Generator

python/pyarrow/tests/test_udf.py:683–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

681 schema = datasource1_schema()
682
683 class Generator:
684 def __init__(self):
685 self.n = 3
686
687 def __call__(self, ctx):
688 if self.n == 0:
689 batch = _record_batch_from_iters(schema, [], [])
690 else:
691 self.n -= 1
692 batch = _record_batch_for_range(schema, self.n)
693 return batch.to_struct_array()
694 return lambda ctx: Generator()
695
696

Callers 1

datasource1_directFunction · 0.70

Calls

no outgoing calls

Tested by 1

datasource1_directFunction · 0.56