augustoasilva commented on a change in pull request #11166:
URL: https://github.com/apache/arrow/pull/11166#discussion_r744759654
##########
File path: cpp/src/gandiva/tests/projector_test.cc
##########
@@ -1606,4 +1606,46 @@ TEST_F(TestProjector, TestCastNullableIntYearInterval) {
EXPECT_ARROW_ARRAY_EQUALS(out_int64, outputs.at(1));
}
+TEST_F(TestProjector, TestEltFunction) {
+ auto field0 = field("f0", arrow::int32());
+ auto field1 = field("f1", arrow::utf8());
+ auto field2 = field("f2", arrow::utf8());
+
+ auto schema0 = arrow::schema({field0, field1, field2});
+
+ // output fields
+ auto out_field0 = field("out_field0", arrow::utf8());
+
+ // Build expression
+ auto elt_expr0 =
+ TreeExprBuilder::MakeExpression("elt", {field0, field1, field2},
out_field0);
+
+ std::shared_ptr<Projector> projector1;
+
+ auto status = Projector::Make(schema0, {elt_expr0}, TestConfiguration(),
&projector1);
+ EXPECT_TRUE(status.ok());
+
+ // Create a row-batch with some sample data
+ int num_records = 5;
+
+ auto array0 = MakeArrowArrayInt32({1, 2, 4, 0, -2}, {true, true, true, true,
true});
Review comment:
I did not get the cases where the pos keep changing. Changing where? Do
you mean a random generated pos value at execution time?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]