westonpace commented on code in PR #15097:
URL: https://github.com/apache/arrow/pull/15097#discussion_r1061859964
##########
cpp/src/arrow/engine/substrait/serde_test.cc:
##########
@@ -216,6 +216,33 @@ void CheckRoundTripResult(const std::shared_ptr<Table>
expected_table,
compute::AssertTablesEqualIgnoringOrder(merged_expected, output_table);
}
+int CountProjectNodeOptionsInDeclarations(const compute::Declaration& input) {
+ int counter = 0;
+ if (input.factory_name == "project") {
+ counter++;
+ }
+ const auto& inputs = input.inputs;
+ for (const auto& in : inputs) {
+ return counter +
+
CountProjectNodeOptionsInDeclarations(std::get<compute::Declaration>(in));
+ }
+ return counter;
+}
Review Comment:
For it to fail you would need a node with multiple inputs. So something
like a join where there was a project on the right hand side.
--
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]