Skip to content

Commit

Permalink
Remove LLVM IR API from Gandiva's pyarrow binding since the configura…
Browse files Browse the repository at this point in the history
…tion is not exposed so LLVM IR cannot be called.
  • Loading branch information
niyue committed Dec 6, 2023
1 parent 4d02cf2 commit 83b1980
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
8 changes: 0 additions & 8 deletions python/pyarrow/gandiva.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,6 @@ cdef class Projector(_Weakrefable):
self.pool = pool
return self

@property
def llvm_ir(self):
return self.projector.get().DumpIR().decode()

def evaluate(self, RecordBatch batch, SelectionVector selection=None):
"""
Evaluate the specified record batch and return the arrays at the
Expand Down Expand Up @@ -235,10 +231,6 @@ cdef class Filter(_Weakrefable):
self.filter = filter
return self

@property
def llvm_ir(self):
return self.filter.get().DumpIR().decode()

def evaluate(self, RecordBatch batch, MemoryPool pool, dtype='int32'):
"""
Evaluate the specified record batch and return a selection vector.
Expand Down
5 changes: 0 additions & 5 deletions python/pyarrow/tests/test_gandiva.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ def test_tree_exp_builder():
projector = gandiva.make_projector(
schema, [expr], pa.default_memory_pool())

# Gandiva generates compute kernel function named `@expr_X`
assert projector.llvm_ir.find("@expr_") != -1

a = pa.array([10, 12, -20, 5], type=pa.int32())
b = pa.array([5, 15, 15, 17], type=pa.int32())
e = pa.array([10, 15, 15, 17], type=pa.int32())
Expand Down Expand Up @@ -105,8 +102,6 @@ def test_filter():
assert condition.result().type == pa.bool_()

filter = gandiva.make_filter(table.schema, condition)
# Gandiva generates compute kernel function named `@expr_X`
assert filter.llvm_ir.find("@expr_") != -1

result = filter.evaluate(table.to_batches()[0], pa.default_memory_pool())
assert result.to_array().equals(pa.array(range(1000), type=pa.uint32()))
Expand Down

0 comments on commit 83b1980

Please sign in to comment.