github-actions[bot] commented on code in PR #14928:
URL: https://github.com/apache/doris/pull/14928#discussion_r1044992290


##########
be/src/pipeline/exec/operator.h:
##########
@@ -297,20 +302,22 @@ class DataSinkOperator : public OperatorBase {
  * All operators inherited from Operator will hold a ExecNode inside.
  */
 template <typename OperatorBuilderType>
-class Operator : public OperatorBase {
+class StreamingOperator : public OperatorBase {
 public:
     using NodeType =
             
std::remove_pointer_t<decltype(std::declval<OperatorBuilderType>().exec_node())>;
 
-    Operator(OperatorBuilderBase* builder, ExecNode* node)
+    StreamingOperator(OperatorBuilderBase* builder, ExecNode* node)
             : OperatorBase(builder), _node(reinterpret_cast<NodeType*>(node)) 
{};
 
-    ~Operator() override = default;
+    ~StreamingOperator() override = default;
+
+    std::string get_name() const override { return "StreamingOperator"; }
 
     Status prepare(RuntimeState* state) override {
         _runtime_profile.reset(new 
RuntimeProfile(_operator_builder->get_name()));
         _node->runtime_profile()->insert_child_head(_runtime_profile.get(), 
true);

Review Comment:
   warning: member access into incomplete type 
'doris::pipeline::StreamingOperator<doris::pipeline::ConstValueOperatorBuilder>::NodeType'
 (aka 'doris::vectorized::VUnionNode') [clang-diagnostic-error]
   ```cpp
   ;
                  ^
   ```
   **be/src/pipeline/exec/const_value_operator.h:40:** in instantiation of 
member function 
'doris::pipeline::StreamingOperator<doris::pipeline::ConstValueOperatorBuilder>::prepare'
 requested here
   ```cpp
       ConstValueOperator(OperatorBuilderBase* operator_builder, ExecNode* node)
       ^
   ```
   **be/src/pipeline/exec/const_value_operator.h:23:** forward declaration of 
'doris::vectorized::VUnionNode'
   ```cpp
   class VUnionNode;
         ^
   ```
   



##########
be/src/pipeline/exec/operator.h:
##########
@@ -297,20 +302,22 @@
  * All operators inherited from Operator will hold a ExecNode inside.
  */
 template <typename OperatorBuilderType>
-class Operator : public OperatorBase {
+class StreamingOperator : public OperatorBase {
 public:
     using NodeType =
             
std::remove_pointer_t<decltype(std::declval<OperatorBuilderType>().exec_node())>;
 
-    Operator(OperatorBuilderBase* builder, ExecNode* node)
+    StreamingOperator(OperatorBuilderBase* builder, ExecNode* node)
             : OperatorBase(builder), _node(reinterpret_cast<NodeType*>(node)) 
{};
 
-    ~Operator() override = default;
+    ~StreamingOperator() override = default;
+
+    std::string get_name() const override { return "StreamingOperator"; }
 
     Status prepare(RuntimeState* state) override {
         _runtime_profile.reset(new 
RuntimeProfile(_operator_builder->get_name()));
         _node->runtime_profile()->insert_child_head(_runtime_profile.get(), 
true);
-        _mem_tracker = std::make_unique<MemTracker>("Operator:" + 
_runtime_profile->name(),
+        _mem_tracker = std::make_unique<MemTracker>(get_name() + ": " + 
_runtime_profile->name(),
                                                     _runtime_profile.get());
         _node->increase_ref();

Review Comment:
   warning: member access into incomplete type 
'doris::pipeline::StreamingOperator<doris::pipeline::ConstValueOperatorBuilder>::NodeType'
 (aka 'doris::vectorized::VUnionNode') [clang-diagnostic-error]
   ```cpp
   ;
                  ^
   ```
   **be/src/pipeline/exec/const_value_operator.h:23:** forward declaration of 
'doris::vectorized::VUnionNode'
   ```cpp
   class VUnionNode;
         ^
   ```
   



##########
be/src/pipeline/exec/operator.h:
##########
@@ -358,6 +366,29 @@
     NodeType* _node;
 };
 
+template <typename OperatorBuilderType>
+class SourceOperator : public StreamingOperator<OperatorBuilderType> {
+public:
+    using NodeType =
+            
std::remove_pointer_t<decltype(std::declval<OperatorBuilderType>().exec_node())>;
+
+    SourceOperator(OperatorBuilderBase* builder, ExecNode* node)
+            : StreamingOperator<OperatorBuilderType>(builder, node) {};
+
+    ~SourceOperator() override = default;
+
+    std::string get_name() const override { return "SourceOperator"; }
+
+    Status get_block(RuntimeState* state, vectorized::Block* block,
+                     SourceState& source_state) override {
+        auto& node = StreamingOperator<OperatorBuilderType>::_node;
+        bool eos = false;
+        RETURN_IF_ERROR(node->pull(state, block, &eos));

Review Comment:
   warning: member access into incomplete type 
'doris::pipeline::StreamingOperator<doris::pipeline::ConstValueOperatorBuilder>::NodeType'
 (aka 'doris::vectorized::VUnionNode') [clang-diagnostic-error]
   ```cpp
   ;
                                 ^
   ```
   **be/src/pipeline/exec/const_value_operator.h:40:** in instantiation of 
member function 
'doris::pipeline::SourceOperator<doris::pipeline::ConstValueOperatorBuilder>::get_block'
 requested here
   ```cpp
       ConstValueOperator(OperatorBuilderBase* operator_builder, ExecNode* node)
       ^
   ```
   **be/src/pipeline/exec/const_value_operator.h:23:** forward declaration of 
'doris::vectorized::VUnionNode'
   ```cpp
   class VUnionNode;
         ^
   ```
   



##########
be/src/pipeline/exec/operator.h:
##########
@@ -339,9 +346,10 @@
     Status get_block(RuntimeState* state, vectorized::Block* block,
                      SourceState& source_state) override {
         SCOPED_TIMER(_runtime_profile->total_time_counter());
+        DCHECK(_child);
+        RETURN_IF_ERROR(_child->get_block(state, block, source_state));
         bool eos = false;
         RETURN_IF_ERROR(_node->pull(state, block, &eos));

Review Comment:
   warning: member access into incomplete type 
'doris::pipeline::StreamingOperator<doris::pipeline::ConstValueOperatorBuilder>::NodeType'
 (aka 'doris::vectorized::VUnionNode') [clang-diagnostic-error]
   ```cpp
   ;
                                  ^
   ```
   **be/src/pipeline/exec/operator.h:377:** in instantiation of member function 
'doris::pipeline::StreamingOperator<doris::pipeline::ConstValueOperatorBuilder>::get_block'
 requested here
   ```cpp
   
         ^
   ```
   **be/src/pipeline/exec/const_value_operator.h:23:** forward declaration of 
'doris::vectorized::VUnionNode'
   ```cpp
   class VUnionNode;
         ^
   ```
   



-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to