yiguolei commented on code in PR #51265:
URL: https://github.com/apache/doris/pull/51265#discussion_r2108299860
##########
be/src/vec/data_types/serde/data_type_serde.h:
##########
@@ -405,15 +405,23 @@ inline static NullMap revert_null_map(const NullMap*
null_bytemap, size_t start,
return res;
}
-inline void checkArrowStatus(const arrow::Status& status, const std::string&
column,
- const std::string& format_name) {
+inline Status checkArrowStatus(const arrow::Status& status, const std::string&
column,
+ const std::string& format_name) {
if (!status.ok()) {
- throw Exception(
- Status::FatalError("arrow serde with arrow: {} with column :
{} with error msg: {}",
- format_name, column, status.ToString()));
+ return Status::FatalError("arrow serde with arrow: {} with column : {}
with error msg: {}",
+ format_name, column, status.ToString());
}
+ return Status::OK();
}
+#define RETURN_IF_ARROW_ERROR(...) \
+ do { \
+ Status _status_ = checkArrowStatus(__VA_ARGS__); \
+ if (UNLIKELY(!_status_.ok())) { \
Review Comment:
不要这么定义,这样啥都能搞,但是实际是得符合checkarrowstatus的要求,语义很不明确。
让用户在外面显示的调用checkArrowStatus,然后把结果传递给RETURN_IF_ARROW_ERROR
--
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]