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 2022/05/06 14:45:02 UTC

[GitHub] [arrow] vibhatha commented on a diff in pull request #13069: ARROW-15901: [C++] Support custom output field names in Substrait

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


##########
cpp/src/arrow/compute/exec/options.h:
##########
@@ -232,10 +232,13 @@ class ARROW_EXPORT SinkNodeConsumer {
 /// \brief Add a sink node which consumes data within the exec plan run
 class ARROW_EXPORT ConsumingSinkNodeOptions : public ExecNodeOptions {
  public:
-  explicit ConsumingSinkNodeOptions(std::shared_ptr<SinkNodeConsumer> consumer)
-      : consumer(std::move(consumer)) {}
+  explicit ConsumingSinkNodeOptions(std::shared_ptr<SinkNodeConsumer> consumer,
+                                    std::vector<std::string> names = {})
+      : consumer(std::move(consumer)), names(std::move(names)) {}
 
   std::shared_ptr<SinkNodeConsumer> consumer;
+  /// \brief Names to rename the sink's schema fields to
+  std::vector<std::string> names;

Review Comment:
   Nit: May be distinguish the member variables with an underscore?
   
   ```c++
   std::shared_ptr<SinkNodeConsumer> consumer_;
   std::vector<std::string> names_;
   ```
   
   And change the rest accordingly. Looking into `ConsumingSinkNode`, that is the style adopted. 
   



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