github-actions[bot] commented on code in PR #17531:
URL: https://github.com/apache/doris/pull/17531#discussion_r1127741249
##########
be/src/vec/exprs/table_function/vexplode_bitmap.h:
##########
@@ -26,7 +26,7 @@ namespace doris::vectorized {
class VExplodeBitmapTableFunction final : public TableFunction {
public:
VExplodeBitmapTableFunction();
- ~VExplodeBitmapTableFunction() override;
+ ~VExplodeBitmapTableFunction() = default;
Review Comment:
warning: annotate this function with 'override' or (rarely) 'final'
[modernize-use-override]
```suggestion
~VExplodeBitmapTableFunction() override = default;
```
##########
be/src/common/exception.h:
##########
@@ -0,0 +1,76 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+
+#include "common/status.h"
+
+namespace doris {
+
+class Exception : public std::exception {
+public:
+ Exception() : _code(ErrorCode::OK) {}
+ Exception(int code, const std::string_view msg);
+ // add nested exception as first param, or the template may could not find
+ // the correct method for ...args
+ Exception(const Exception& nested, int code, const std::string_view msg);
+
+ // Format message with fmt::format, like the logging functions.
+ template <typename... Args>
+ Exception(int code, const std::string_view fmt, Args&&... args)
+ : Exception(code, fmt::format(fmt, std::forward<Args>(args)...)) {}
+
+ std::string code_as_string() const {
+ return (int)_code >= 0 ?
doris::to_string(static_cast<TStatusCode::type>(_code))
+ : fmt::format("E{}", (int16_t)_code);
+ }
+
+ int code() { return _code; }
Review Comment:
warning: method 'code' can be made const
[readability-make-member-function-const]
```suggestion
int code() const { return _code; }
```
--
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]