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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to