vibhatha commented on code in PR #15097:
URL: https://github.com/apache/arrow/pull/15097#discussion_r1061128100


##########
cpp/src/arrow/engine/substrait/serde_test.cc:
##########
@@ -216,6 +216,20 @@ void CheckRoundTripResult(const std::shared_ptr<Table> 
expected_table,
   compute::AssertTablesEqualIgnoringOrder(merged_expected, output_table);
 }
 
+void countProjectNodeOptionsInDeclarations(const compute::Declaration& input,
+                                           int& counter) {
+  const auto& options = input.options;
+  const auto& inputs = input.inputs;
+  const auto* maybe_project_option =
+      dynamic_cast<const compute::ProjectNodeOptions*>(options.get());
+  if (maybe_project_option != NULL) {
+    counter++;
+  }
+  for (const auto& in : inputs) {
+    countProjectNodeOptionsInDeclarations(std::get<compute::Declaration>(in), 
counter);
+  }
+}
+

Review Comment:
   @westonpace I added this function to count the number of projections. And 
also updated the plan to have nested projection. 



-- 
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]

Reply via email to