yiguolei commented on code in PR #23134:
URL: https://github.com/apache/doris/pull/23134#discussion_r1299153946


##########
be/src/pipeline/exec/operator.h:
##########
@@ -157,11 +157,11 @@ class OperatorBase {
     explicit OperatorBase(OperatorBuilderBase* operator_builder);
     virtual ~OperatorBase() = default;
 
-    std::string get_name() const { return _operator_builder->get_name(); }
+    [[nodiscard]] std::string get_name() const { return 
_operator_builder->get_name(); }
 
-    bool is_sink() const;
+    [[nodiscard]] bool is_sink() const;

Review Comment:
   only Status method_name() need nodiscard because we want the developer to 
check the ERROR STATUS.
   But if the return value is string, for example, get_name, it not need to 
check the value.



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