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

Method __call__

python/pyarrow/tests/test_udf.py:664–674  ·  view source on GitHub ↗
(self, ctx)

Source from the content-addressed store, hash-verified

662 self.caller = None
663
664 def __call__(self, ctx):
665 try:
666 if self.caller is None:
667 self.caller, ctx = batch_gen(ctx).send, None
668 batch = self.caller(ctx)
669 except StopIteration:
670 arrays = [pa.array([], type=field.type)
671 for field in schema]
672 batch = pa.RecordBatch.from_arrays(
673 arrays=arrays, schema=schema)
674 return batch.to_struct_array()
675 return UDT()
676 return udf_func
677

Callers

nothing calls this directly

Calls 2

batch_genFunction · 0.70
arrayMethod · 0.45

Tested by

no test coverage detected