Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-12705

[C++][Gandiva] Performance issue for TreeExprBuilder::MakeIf when nested plenty times.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • C++, C++ - Gandiva
    • None

    Description

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

      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);
      

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            ZMZ91 ZMZ91
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: