westonpace commented on code in PR #15253: URL: https://github.com/apache/arrow/pull/15253#discussion_r1084447974
########## cpp/src/arrow/compute/exec/exec_plan.h: ########## @@ -121,18 +119,20 @@ class ARROW_EXPORT ExecNode { virtual const char* kind_name() const = 0; - // The number of inputs/outputs expected by this node + // The number of inputs expected by this node int num_inputs() const { return static_cast<int>(inputs_.size()); } - int num_outputs() const { return num_outputs_; } /// This node's predecessors in the exec plan const NodeVector& inputs() const { return inputs_; } + /// True if the plan has no output schema (is a sink) + bool is_sink() const { return !output_schema_; } Review Comment: > That being said, I am a bit curious why this is important. I think it is valid to say that a sink node doesn't have an output schema. We don't rely on it having an output schema anywhere (or we shouldn't) that I know of. @save-buffer ping -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org