You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ZMZ91 (Jira)" <ji...@apache.org> on 2021/05/09 09:30:00 UTC

[jira] [Created] (ARROW-12705) [C++][Gandiva] Performance issue for TreeExprBuilder::MakeIf when nested plenty times.

ZMZ91 created ARROW-12705:
-----------------------------

             Summary: [C++][Gandiva] Performance issue for TreeExprBuilder::MakeIf when nested plenty times.
                 Key: ARROW-12705
                 URL: https://issues.apache.org/jira/browse/ARROW-12705
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++, C++ - Gandiva
            Reporter: ZMZ91


Run following code, it hangs on the last line. Could you help check is this expected and any idea to optimize the usage? Thanks.

```c++

auto top_node = TreeExprBuilder::MakeField(fielda);
for (int64_t i = 0; i < 20; i++) {
  auto comp_node = TreeExprBuilder::MakeLiteral(i);
  auto when = TreeExprBuilder::MakeFunction("greater_than", \{top_node, comp_node}, arrow::boolean());
  top_node = TreeExprBuilder::MakeIf(when, top_node, comp_node, arrow::int64());
}

auto expr = TreeExprBuilder::MakeExpression(top_node, field_result);
std::shared_ptr<Projector> projector;
auto status = Projector::Make(schema, \{expr}, TestConfiguration(), &projector);

```



--
This message was sent by Atlassian Jira
(v8.3.4#803005)