Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.

Commit c8d274f

Browse files
committed
Address comments
1 parent 0bcebc8 commit c8d274f

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

cpp/src/gandiva/arrow.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <arrow/builder.h>
2626
#include <arrow/pretty_print.h>
2727
#include <arrow/record_batch.h>
28-
#include <arrow/result.h>
2928
#include <arrow/status.h>
3029
#include <arrow/type.h>
3130

cpp/src/gandiva/engine.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
#include "arrow/util/macros.h"
2727

28-
#include "gandiva/arrow.h"
2928
#include "gandiva/configuration.h"
3029
#include "gandiva/llvm_includes.h"
3130
#include "gandiva/llvm_types.h"

cpp/src/gandiva/engine_llvm_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
namespace gandiva {
2626

27-
typedef int64_t (*add_vector_func_t)(int64_t*, int);
27+
typedef int64_t (*add_vector_func_t)(int64_t* data, int n);
2828

2929
class TestEngine : public ::testing::Test {
3030
protected:

python/pyarrow/gandiva.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ cdef class Projector:
150150
return self
151151

152152
@property
153-
def ir(self):
153+
def llvm_ir(self):
154154
return self.projector.get().DumpIR().decode()
155155

156156
def evaluate(self, RecordBatch batch):
@@ -179,7 +179,7 @@ cdef class Filter:
179179
return self
180180

181181
@property
182-
def ir(self):
182+
def llvm_ir(self):
183183
return self.filter.get().DumpIR().decode()
184184

185185
def evaluate(self, RecordBatch batch, MemoryPool pool, dtype='int32'):

python/pyarrow/tests/test_gandiva.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ def test_tree_exp_builder():
4646
projector = gandiva.make_projector(
4747
schema, [expr], pa.default_memory_pool())
4848

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

5152
a = pa.array([10, 12, -20, 5], type=pa.int32())
5253
b = pa.array([5, 15, 15, 17], type=pa.int32())
@@ -98,7 +99,9 @@ def test_filter():
9899
condition = builder.make_condition(cond)
99100

100101
filter = gandiva.make_filter(table.schema, condition)
101-
assert filter.ir.find("@expr_") != -1
102+
# Gandiva generates compute kernel function named `@expr_X`
103+
assert filter.llvm_ir.find("@expr_") != -1
104+
102105
result = filter.evaluate(table.to_batches()[0], pa.default_memory_pool())
103106
assert result.to_array().equals(pa.array(range(1000), type=pa.uint32()))
104107

0 commit comments

Comments
 (0)