pyarrow.gandiva.Filter

class pyarrow.gandiva.Filter

Bases: pyarrow.lib._Weakrefable

A Gandiva filter executor, containing the optimized filter function.

To create an instance, use the pyarrow.gandiva.make_filter() function.

See also

pyarrow.gandiva.make_filter

Factory function for filters

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(*args, **kwargs)

Initialize self.

evaluate(self, RecordBatch batch, …[, dtype])

Evaluate the filter agianst a record batch to get a SelectionVector.

Attributes

llvm_ir

The optimized LLVM Internal Representation (IR) code.

evaluate(self, RecordBatch batch, MemoryPool pool, dtype=u'int32')

Evaluate the filter agianst a record batch to get a SelectionVector.

The SelectionVector contains the indices of the matching rows.

Parameters
  • batch (pyarrow.RecordBatch) – Input record batch. Schema must match the schema provided when creating the filter.

  • pool (pyarrow.MemoryPool) – Memory pool to use. Typically will use pyarrow.default_memory_pool().

  • dtype ('int16', 'int32' and 'int64') – Selection vector type to return. Must be large enough to represent all indices of record batches.

Returns

SelectionVector

llvm_ir

The optimized LLVM Internal Representation (IR) code.