You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/09/02 13:54:03 UTC

[GitHub] [arrow] lidavidm opened a new pull request #11068: ARROW-13785: [C++] Add methods to print exec nodes/plans

lidavidm opened a new pull request #11068:
URL: https://github.com/apache/arrow/pull/11068


   Example output:
   
   ```
   ExecPlan with 6 nodes:
   SourceNode{"source", outputs=["filter"]}
   FilterNode{"filter", inputs=[target: "source"], outputs=["project"], filter=(i32 >= 0)}
   ProjectNode{"project", inputs=[target: "filter"], outputs=["aggregate"], projection=[bool, multiply(i32, 2)]}
   GroupByNode{"aggregate", inputs=[groupby: "project"], outputs=["filter"], keys=["bool"], aggregates=[
   	hash_sum(multiply(i32, 2)),
   	hash_count(multiply(i32, 2), {mode=NON_NULL}),
   ]}
   FilterNode{"filter", inputs=[target: "aggregate"], outputs=["order_by_sink"], filter=(sum(multiply(i32, 2)) > 10)}
   OrderBySinkNode{"order_by_sink", inputs=[collected: "filter"], by={sort_keys=[sum(multiply(i32, 2)) ASC]}}
   ```
   
   This prints nodes in the order of the topological sort. Since this is a graph and not necessarily a tree, I didn't try to indent the nodes themselves or anything.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] lidavidm commented on a change in pull request #11068: ARROW-13785: [C++] Add methods to print exec nodes/plans

Posted by GitBox <gi...@apache.org>.
lidavidm commented on a change in pull request #11068:
URL: https://github.com/apache/arrow/pull/11068#discussion_r704512287



##########
File path: cpp/src/arrow/compute/exec/aggregate_node.cc
##########
@@ -225,6 +236,23 @@ class ScalarAggregateNode : public ExecNode {
 
   Future<> finished() override { return finished_; }
 
+ protected:
+  std::string ToStringExtra() const override {
+    std::stringstream ss;
+    const auto input_schema = inputs_[0]->output_schema();
+    ss << "aggregates=[" << std::endl;

Review comment:
       Sure, pulled out a helper function.




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] nealrichardson closed pull request #11068: ARROW-13785: [C++] Add methods to print exec nodes/plans

Posted by GitBox <gi...@apache.org>.
nealrichardson closed pull request #11068:
URL: https://github.com/apache/arrow/pull/11068


   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] felipeblazing commented on a change in pull request #11068: ARROW-13785: [C++] Add methods to print exec nodes/plans

Posted by GitBox <gi...@apache.org>.
felipeblazing commented on a change in pull request #11068:
URL: https://github.com/apache/arrow/pull/11068#discussion_r704502506



##########
File path: cpp/src/arrow/compute/exec/aggregate_node.cc
##########
@@ -225,6 +236,23 @@ class ScalarAggregateNode : public ExecNode {
 
   Future<> finished() override { return finished_; }
 
+ protected:
+  std::string ToStringExtra() const override {
+    std::stringstream ss;
+    const auto input_schema = inputs_[0]->output_schema();
+    ss << "aggregates=[" << std::endl;

Review comment:
       I see this code repeated in group by node. Is there anyway we can make a function that wraps this functionality so we dont't have to update it twice if that ever becomes necessary?




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #11068: ARROW-13785: [C++] Add methods to print exec nodes/plans

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #11068:
URL: https://github.com/apache/arrow/pull/11068#issuecomment-911710378


   https://issues.apache.org/jira/browse/ARROW-13785


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org