This is an automated email from the ASF dual-hosted git repository.

panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 2e2d5bcba21 [Improvements](status) catch some error status (#25677)
2e2d5bcba21 is described below

commit 2e2d5bcba21854261eefde5d89e2ab429589aee5
Author: Pxl <[email protected]>
AuthorDate: Mon Oct 23 10:19:08 2023 +0800

    [Improvements](status) catch some error status (#25677)
    
    catch some error status
---
 be/src/agent/utils.cpp                             |  6 +--
 be/src/exec/odbc_connector.cpp                     |  2 +-
 be/src/exec/olap_common.h                          |  2 +-
 .../schema_scanner/schema_charsets_scanner.cpp     |  8 ++--
 .../schema_scanner/schema_collations_scanner.cpp   | 12 +++---
 .../exec/schema_scanner/schema_columns_scanner.cpp | 50 +++++++++++-----------
 .../schema_metadata_name_ids_scanner.cpp           | 20 ++++-----
 .../exec/schema_scanner/schema_rowsets_scanner.cpp | 24 +++++------
 .../schema_schema_privileges_scanner.cpp           | 10 ++---
 .../schema_scanner/schema_schemata_scanner.cpp     | 12 +++---
 .../schema_table_privileges_scanner.cpp            | 12 +++---
 .../exec/schema_scanner/schema_tables_scanner.cpp  | 44 +++++++++----------
 .../schema_user_privileges_scanner.cpp             |  8 ++--
 .../schema_scanner/schema_variables_scanner.cpp    |  4 +-
 .../exec/schema_scanner/schema_views_scanner.cpp   | 20 ++++-----
 be/src/exprs/runtime_filter.cpp                    |  8 ++--
 be/src/exprs/runtime_filter_slots.h                | 11 ++---
 be/src/http/action/pad_rowset_action.cpp           |  2 +-
 be/src/io/file_factory.cpp                         |  4 +-
 be/src/io/fs/multi_table_pipe.cpp                  |  6 +--
 be/src/io/fs/s3_file_bufferpool.cpp                |  2 +-
 be/src/io/fs/s3_file_writer.cpp                    |  4 +-
 be/src/io/fs/stream_load_pipe.cpp                  |  2 +-
 be/src/olap/compaction.cpp                         |  6 +--
 be/src/olap/data_dir.cpp                           | 26 +++++------
 be/src/olap/full_compaction.cpp                    |  2 +-
 be/src/olap/match_predicate.cpp                    |  2 +-
 be/src/olap/merger.cpp                             |  4 +-
 be/src/olap/push_handler.cpp                       | 10 ++---
 be/src/olap/schema_change.cpp                      | 38 +++++++++-------
 30 files changed, 184 insertions(+), 177 deletions(-)

diff --git a/be/src/agent/utils.cpp b/be/src/agent/utils.cpp
index 0c6f977783f..25217497686 100644
--- a/be/src/agent/utils.cpp
+++ b/be/src/agent/utils.cpp
@@ -102,7 +102,7 @@ Status MasterServerClient::finish_task(const 
TFinishTaskRequest& request, TMaste
             client->finishTask(*result, request);
         }
     } catch (std::exception& e) {
-        static_cast<void>(client.reopen(config::thrift_rpc_timeout_ms));
+        RETURN_IF_ERROR(client.reopen(config::thrift_rpc_timeout_ms));
         LOG(WARNING) << "fail to finish_task. "
                      << "host=" << _master_info.network_address.hostname
                      << ", port=" << _master_info.network_address.port << ", 
error=" << e.what();
@@ -152,7 +152,7 @@ Status MasterServerClient::report(const TReportRequest& 
request, TMasterResult*
             }
         }
     } catch (std::exception& e) {
-        static_cast<void>(client.reopen(config::thrift_rpc_timeout_ms));
+        RETURN_IF_ERROR(client.reopen(config::thrift_rpc_timeout_ms));
         LOG(WARNING) << "fail to report to master. "
                      << "host=" << _master_info.network_address.hostname
                      << ", port=" << _master_info.network_address.port
@@ -203,7 +203,7 @@ Status MasterServerClient::confirm_unused_remote_files(
             }
         }
     } catch (std::exception& e) {
-        static_cast<void>(client.reopen(config::thrift_rpc_timeout_ms));
+        RETURN_IF_ERROR(client.reopen(config::thrift_rpc_timeout_ms));
         return Status::InternalError(
                 "fail to confirm unused remote files. host={}, port={}, 
code={}, reason={}",
                 _master_info.network_address.hostname, 
_master_info.network_address.port,
diff --git a/be/src/exec/odbc_connector.cpp b/be/src/exec/odbc_connector.cpp
index efeb779f2c9..e25d6ff62f2 100644
--- a/be/src/exec/odbc_connector.cpp
+++ b/be/src/exec/odbc_connector.cpp
@@ -62,7 +62,7 @@ ODBCConnector::ODBCConnector(const ODBCConnectorParam& param)
 Status ODBCConnector::close(Status) {
     // do not commit transaction, roll back
     if (_is_in_transaction) {
-        static_cast<void>(abort_trans());
+        RETURN_IF_ERROR(abort_trans());
     }
 
     if (_stmt != nullptr) {
diff --git a/be/src/exec/olap_common.h b/be/src/exec/olap_common.h
index 8be58e9790a..b9f53c3f7dc 100644
--- a/be/src/exec/olap_common.h
+++ b/be/src/exec/olap_common.h
@@ -902,7 +902,7 @@ Status 
ColumnValueRange<primitive_type>::add_range(SQLFilterOp op, CppType value
 
         if (FILTER_LARGER_OR_EQUAL == _low_op && FILTER_LESS_OR_EQUAL == 
_high_op &&
             _high_value == _low_value) {
-            static_cast<void>(add_fixed_value(_high_value));
+            RETURN_IF_ERROR(add_fixed_value(_high_value));
             _high_value = TYPE_MIN;
             _low_value = TYPE_MAX;
         }
diff --git a/be/src/exec/schema_scanner/schema_charsets_scanner.cpp 
b/be/src/exec/schema_scanner/schema_charsets_scanner.cpp
index 200c2c1b0c9..1b2b8a15581 100644
--- a/be/src/exec/schema_scanner/schema_charsets_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_charsets_scanner.cpp
@@ -74,7 +74,7 @@ Status 
SchemaCharsetsScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(_s_charsets[i].charset, 
strlen(_s_charsets[i].charset));
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 0, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, datas));
     }
     // DEFAULT_COLLATE_NAME
     {
@@ -84,7 +84,7 @@ Status 
SchemaCharsetsScanner::_fill_block_impl(vectorized::Block* block) {
                                 strlen(_s_charsets[i].default_collation));
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 1, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 1, datas));
     }
     // DESCRIPTION
     {
@@ -93,7 +93,7 @@ Status 
SchemaCharsetsScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(_s_charsets[i].description, 
strlen(_s_charsets[i].description));
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 2, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 2, datas));
     }
     // maxlen
     {
@@ -102,7 +102,7 @@ Status 
SchemaCharsetsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i] = _s_charsets[i].maxlen;
             datas[i] = srcs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 3, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 3, datas));
     }
     return Status::OK();
 }
diff --git a/be/src/exec/schema_scanner/schema_collations_scanner.cpp 
b/be/src/exec/schema_scanner/schema_collations_scanner.cpp
index a5203a1ca6d..377cff69486 100644
--- a/be/src/exec/schema_scanner/schema_collations_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_collations_scanner.cpp
@@ -77,7 +77,7 @@ Status 
SchemaCollationsScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(_s_collations[i].name, 
strlen(_s_collations[i].name));
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 0, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, datas));
     }
     // charset
     {
@@ -86,7 +86,7 @@ Status 
SchemaCollationsScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(_s_collations[i].charset, 
strlen(_s_collations[i].charset));
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 1, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 1, datas));
     }
     // id
     {
@@ -95,7 +95,7 @@ Status 
SchemaCollationsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i] = _s_collations[i].id;
             datas[i] = srcs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 2, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 2, datas));
     }
     // is_default
     {
@@ -104,7 +104,7 @@ Status 
SchemaCollationsScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(_s_collations[i].is_default, 
strlen(_s_collations[i].is_default));
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 3, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 3, datas));
     }
     // IS_COMPILED
     {
@@ -113,7 +113,7 @@ Status 
SchemaCollationsScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(_s_collations[i].is_compile, 
strlen(_s_collations[i].is_compile));
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 4, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 4, datas));
     }
     // sortlen
     {
@@ -122,7 +122,7 @@ Status 
SchemaCollationsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i] = _s_collations[i].sortlen;
             datas[i] = srcs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 5, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 5, datas));
     }
     return Status::OK();
 }
diff --git a/be/src/exec/schema_scanner/schema_columns_scanner.cpp 
b/be/src/exec/schema_scanner/schema_columns_scanner.cpp
index 0c728643f77..9eec707f74b 100644
--- a/be/src/exec/schema_scanner/schema_columns_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_columns_scanner.cpp
@@ -341,14 +341,14 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
     // TABLE_CATALOG
     {
         if (!_db_result.__isset.catalogs) {
-            static_cast<void>(fill_dest_column_for_range(block, 0, 
null_datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, null_datas));
         } else {
             std::string catalog_name = _db_result.catalogs[_db_index - 1];
             StringRef str = StringRef(catalog_name.c_str(), 
catalog_name.size());
             for (int i = 0; i < columns_num; ++i) {
                 datas[i] = &str;
             }
-            static_cast<void>(fill_dest_column_for_range(block, 0, datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, datas));
         }
     }
     // TABLE_SCHEMA
@@ -358,7 +358,7 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
         for (int i = 0; i < columns_num; ++i) {
             datas[i] = &str;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 1, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 1, datas));
     }
     // TABLE_NAME
     {
@@ -375,7 +375,7 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
                                 
_table_result.tables[cur_table_index].length());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 2, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 2, datas));
     }
     // COLUMN_NAME
     {
@@ -385,7 +385,7 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
                                 
_desc_result.columns[i].columnDesc.columnName.length());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 3, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 3, datas));
     }
     // ORDINAL_POSITION
     {
@@ -400,10 +400,10 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i] = columns_index++;
             datas[i] = srcs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 4, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 4, datas));
     }
     // COLUMN_DEFAULT
-    { static_cast<void>(fill_dest_column_for_range(block, 5, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 5, null_datas)); }
     // IS_NULLABLE
     {
         StringRef str_yes = StringRef("YES", 3);
@@ -419,7 +419,7 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = &str_no;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 6, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 6, datas));
     }
     // DATA_TYPE
     {
@@ -430,7 +430,7 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(buffers[i].c_str(), buffers[i].length());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 7, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 7, datas));
     }
     // CHARACTER_MAXIMUM_LENGTH
     // For string columns, the maximum length in characters.
@@ -450,7 +450,7 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 8, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 8, datas));
     }
     // CHARACTER_OCTET_LENGTH
     // For string columns, the maximum length in bytes.
@@ -470,7 +470,7 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 9, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 9, datas));
     }
     // NUMERIC_PRECISION
     {
@@ -483,7 +483,7 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 10, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 10, datas));
     }
     // NUMERIC_SCALE
     {
@@ -496,14 +496,14 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 11, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 11, datas));
     }
     // DATETIME_PRECISION
-    { static_cast<void>(fill_dest_column_for_range(block, 12, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 12, null_datas)); }
     // CHARACTER_SET_NAME
-    { static_cast<void>(fill_dest_column_for_range(block, 13, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 13, null_datas)); }
     // COLLATION_NAME
-    { static_cast<void>(fill_dest_column_for_range(block, 14, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 14, null_datas)); }
     // COLUMN_TYPE
     {
         std::string buffers[columns_num];
@@ -513,7 +513,7 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(buffers[i].c_str(), buffers[i].length());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 15, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 15, datas));
     }
     // COLUMN_KEY
     {
@@ -528,19 +528,19 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = &str;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 16, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 16, datas));
     }
     // EXTRA
     {
         StringRef str = StringRef("", 0);
         std::vector<void*> datas(columns_num, &str);
-        static_cast<void>(fill_dest_column_for_range(block, 17, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 17, datas));
     }
     // PRIVILEGES
     {
         StringRef str = StringRef("", 0);
         std::vector<void*> datas(columns_num, &str);
-        static_cast<void>(fill_dest_column_for_range(block, 18, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 18, datas));
     }
     // COLUMN_COMMENT
     {
@@ -550,7 +550,7 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
                                 _desc_result.columns[i].comment.length());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 19, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 19, datas));
     }
     // COLUMN_SIZE
     {
@@ -563,7 +563,7 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 20, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 20, datas));
     }
     // DECIMAL_DIGITS
     {
@@ -576,12 +576,12 @@ Status 
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 21, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 21, datas));
     }
     // GENERATION_EXPRESSION
-    { static_cast<void>(fill_dest_column_for_range(block, 22, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 22, null_datas)); }
     // SRS_ID
-    { static_cast<void>(fill_dest_column_for_range(block, 23, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 23, null_datas)); }
     return Status::OK();
 }
 
diff --git a/be/src/exec/schema_scanner/schema_metadata_name_ids_scanner.cpp 
b/be/src/exec/schema_scanner/schema_metadata_name_ids_scanner.cpp
index 2a1d91fc9f9..e69596ef8fa 100644
--- a/be/src/exec/schema_scanner/schema_metadata_name_ids_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_metadata_name_ids_scanner.cpp
@@ -145,9 +145,9 @@ Status 
SchemaMetadataNameIdsScanner::_fill_block_impl(vectorized::Block* block)
                 srcs[i] = id;
                 datas[i] = srcs + i;
             }
-            static_cast<void>(fill_dest_column_for_range(block, 0, datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, datas));
         } else {
-            static_cast<void>(fill_dest_column_for_range(block, 0, 
null_datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, null_datas));
         }
     }
 
@@ -159,9 +159,9 @@ Status 
SchemaMetadataNameIdsScanner::_fill_block_impl(vectorized::Block* block)
             for (int i = 0; i < table_num; ++i) {
                 datas[i] = &str_slot;
             }
-            static_cast<void>(fill_dest_column_for_range(block, 1, datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 1, datas));
         } else {
-            static_cast<void>(fill_dest_column_for_range(block, 1, 
null_datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 1, null_datas));
         }
     }
 
@@ -174,9 +174,9 @@ Status 
SchemaMetadataNameIdsScanner::_fill_block_impl(vectorized::Block* block)
                 srcs[i] = id;
                 datas[i] = srcs + i;
             }
-            static_cast<void>(fill_dest_column_for_range(block, 2, datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 2, datas));
         } else {
-            static_cast<void>(fill_dest_column_for_range(block, 2, 
null_datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 2, null_datas));
         }
     }
 
@@ -188,9 +188,9 @@ Status 
SchemaMetadataNameIdsScanner::_fill_block_impl(vectorized::Block* block)
             for (int i = 0; i < table_num; ++i) {
                 datas[i] = &str_slot;
             }
-            static_cast<void>(fill_dest_column_for_range(block, 3, datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 3, datas));
         } else {
-            static_cast<void>(fill_dest_column_for_range(block, 3, 
null_datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 3, null_datas));
         }
     }
     //     table_id
@@ -204,7 +204,7 @@ Status 
SchemaMetadataNameIdsScanner::_fill_block_impl(vectorized::Block* block)
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 4, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 4, datas));
     }
 
     //table_name
@@ -219,7 +219,7 @@ Status 
SchemaMetadataNameIdsScanner::_fill_block_impl(vectorized::Block* block)
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 5, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 5, datas));
     }
 
     return Status::OK();
diff --git a/be/src/exec/schema_scanner/schema_rowsets_scanner.cpp 
b/be/src/exec/schema_scanner/schema_rowsets_scanner.cpp
index a1c45f28319..b760d8bde04 100644
--- a/be/src/exec/schema_scanner/schema_rowsets_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_rowsets_scanner.cpp
@@ -120,7 +120,7 @@ Status 
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
         for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
             datas[i - fill_idx_begin] = &src;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 0, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, datas));
     }
     // ROWSET_ID
     {
@@ -133,7 +133,7 @@ Status 
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
                                                  rowset_ids[i - 
fill_idx_begin].size());
             datas[i - fill_idx_begin] = strs + i - fill_idx_begin;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 1, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 1, datas));
     }
     // TABLET_ID
     {
@@ -143,7 +143,7 @@ Status 
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i - fill_idx_begin] = rowset->rowset_meta()->tablet_id();
             datas[i - fill_idx_begin] = srcs + i - fill_idx_begin;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 2, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 2, datas));
     }
     // ROWSET_NUM_ROWS
     {
@@ -153,7 +153,7 @@ Status 
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i - fill_idx_begin] = rowset->num_rows();
             datas[i - fill_idx_begin] = srcs + i - fill_idx_begin;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 3, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 3, datas));
     }
     // TXN_ID
     {
@@ -163,7 +163,7 @@ Status 
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i - fill_idx_begin] = rowset->txn_id();
             datas[i - fill_idx_begin] = srcs + i - fill_idx_begin;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 4, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 4, datas));
     }
     // NUM_SEGMENTS
     {
@@ -173,7 +173,7 @@ Status 
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i - fill_idx_begin] = rowset->num_segments();
             datas[i - fill_idx_begin] = srcs + i - fill_idx_begin;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 5, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 5, datas));
     }
     // START_VERSION
     {
@@ -183,7 +183,7 @@ Status 
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i - fill_idx_begin] = rowset->start_version();
             datas[i - fill_idx_begin] = srcs + i - fill_idx_begin;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 6, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 6, datas));
     }
     // END_VERSION
     {
@@ -193,7 +193,7 @@ Status 
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i - fill_idx_begin] = rowset->end_version();
             datas[i - fill_idx_begin] = srcs + i - fill_idx_begin;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 7, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 7, datas));
     }
     // INDEX_DISK_SIZE
     {
@@ -203,7 +203,7 @@ Status 
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i - fill_idx_begin] = rowset->index_disk_size();
             datas[i - fill_idx_begin] = srcs + i - fill_idx_begin;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 8, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 8, datas));
     }
     // DATA_DISK_SIZE
     {
@@ -213,7 +213,7 @@ Status 
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i - fill_idx_begin] = rowset->data_disk_size();
             datas[i - fill_idx_begin] = srcs + i - fill_idx_begin;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 9, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 9, datas));
     }
     // CREATION_TIME
     {
@@ -223,7 +223,7 @@ Status 
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i - fill_idx_begin] = rowset->creation_time();
             datas[i - fill_idx_begin] = srcs + i - fill_idx_begin;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 10, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 10, datas));
     }
     // NEWEST_WRITE_TIMESTAMP
     {
@@ -233,7 +233,7 @@ Status 
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
             srcs[i - fill_idx_begin] = rowset->newest_write_timestamp();
             datas[i - fill_idx_begin] = srcs + i - fill_idx_begin;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 11, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 11, datas));
     }
     _rowsets_idx += fill_rowsets_num;
     return Status::OK();
diff --git a/be/src/exec/schema_scanner/schema_schema_privileges_scanner.cpp 
b/be/src/exec/schema_scanner/schema_schema_privileges_scanner.cpp
index b9d6a882d99..09c470ff50a 100644
--- a/be/src/exec/schema_scanner/schema_schema_privileges_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_schema_privileges_scanner.cpp
@@ -110,7 +110,7 @@ Status 
SchemaSchemaPrivilegesScanner::_fill_block_impl(vectorized::Block* block)
             strs[i] = StringRef(priv_status.grantee.c_str(), 
priv_status.grantee.size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 0, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, datas));
     }
     // catalog
     // This value is always def.
@@ -120,7 +120,7 @@ Status 
SchemaSchemaPrivilegesScanner::_fill_block_impl(vectorized::Block* block)
         for (int i = 0; i < privileges_num; ++i) {
             datas[i] = &str;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 1, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 1, datas));
     }
     // schema
     {
@@ -130,7 +130,7 @@ Status 
SchemaSchemaPrivilegesScanner::_fill_block_impl(vectorized::Block* block)
             strs[i] = StringRef(priv_status.schema.c_str(), 
priv_status.schema.size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 2, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 2, datas));
     }
     // privilege type
     {
@@ -141,7 +141,7 @@ Status 
SchemaSchemaPrivilegesScanner::_fill_block_impl(vectorized::Block* block)
                                 priv_status.privilege_type.size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 3, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 3, datas));
     }
     // is grantable
     {
@@ -151,7 +151,7 @@ Status 
SchemaSchemaPrivilegesScanner::_fill_block_impl(vectorized::Block* block)
             strs[i] = StringRef(priv_status.is_grantable.c_str(), 
priv_status.is_grantable.size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 4, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 4, datas));
     }
     return Status::OK();
 }
diff --git a/be/src/exec/schema_scanner/schema_schemata_scanner.cpp 
b/be/src/exec/schema_scanner/schema_schemata_scanner.cpp
index 704e91a7095..a465ab6550c 100644
--- a/be/src/exec/schema_scanner/schema_schemata_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_schemata_scanner.cpp
@@ -104,14 +104,14 @@ Status 
SchemaSchemataScanner::_fill_block_impl(vectorized::Block* block) {
     // catalog
     {
         if (!_db_result.__isset.catalogs) {
-            static_cast<void>(fill_dest_column_for_range(block, 0, 
null_datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, null_datas));
         } else {
             StringRef strs[dbs_num];
             for (int i = 0; i < dbs_num; ++i) {
                 strs[i] = StringRef(_db_result.catalogs[i].c_str(), 
_db_result.catalogs[i].size());
                 datas[i] = strs + i;
             }
-            static_cast<void>(fill_dest_column_for_range(block, 0, datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, datas));
         }
     }
     // schema
@@ -123,7 +123,7 @@ Status 
SchemaSchemataScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(db_names[i].c_str(), db_names[i].size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 1, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 1, datas));
     }
     // DEFAULT_CHARACTER_SET_NAME
     {
@@ -132,7 +132,7 @@ Status 
SchemaSchemataScanner::_fill_block_impl(vectorized::Block* block) {
         for (int i = 0; i < dbs_num; ++i) {
             datas[i] = &str;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 2, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 2, datas));
     }
     // DEFAULT_COLLATION_NAME
     {
@@ -141,10 +141,10 @@ Status 
SchemaSchemataScanner::_fill_block_impl(vectorized::Block* block) {
         for (int i = 0; i < dbs_num; ++i) {
             datas[i] = &str;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 3, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 3, datas));
     }
     // SQL_PATH
-    { static_cast<void>(fill_dest_column_for_range(block, 4, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 4, null_datas)); }
     return Status::OK();
 }
 
diff --git a/be/src/exec/schema_scanner/schema_table_privileges_scanner.cpp 
b/be/src/exec/schema_scanner/schema_table_privileges_scanner.cpp
index 367a26f21c4..41a3faf7c5a 100644
--- a/be/src/exec/schema_scanner/schema_table_privileges_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_table_privileges_scanner.cpp
@@ -112,7 +112,7 @@ Status 
SchemaTablePrivilegesScanner::_fill_block_impl(vectorized::Block* block)
             strs[i] = StringRef(priv_status.grantee.c_str(), 
priv_status.grantee.size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 0, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, datas));
     }
     // catalog
     // This value is always def.
@@ -122,7 +122,7 @@ Status 
SchemaTablePrivilegesScanner::_fill_block_impl(vectorized::Block* block)
         for (int i = 0; i < privileges_num; ++i) {
             datas[i] = &str;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 1, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 1, datas));
     }
     // schema
     {
@@ -132,7 +132,7 @@ Status 
SchemaTablePrivilegesScanner::_fill_block_impl(vectorized::Block* block)
             strs[i] = StringRef(priv_status.schema.c_str(), 
priv_status.schema.size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 2, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 2, datas));
     }
     // table name
     {
@@ -142,7 +142,7 @@ Status 
SchemaTablePrivilegesScanner::_fill_block_impl(vectorized::Block* block)
             strs[i] = StringRef(priv_status.table_name.c_str(), 
priv_status.table_name.size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 3, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 3, datas));
     }
     // privilege type
     {
@@ -153,7 +153,7 @@ Status 
SchemaTablePrivilegesScanner::_fill_block_impl(vectorized::Block* block)
                                 priv_status.privilege_type.size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 4, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 4, datas));
     }
     // is grantable
     {
@@ -163,7 +163,7 @@ Status 
SchemaTablePrivilegesScanner::_fill_block_impl(vectorized::Block* block)
             strs[i] = StringRef(priv_status.is_grantable.c_str(), 
priv_status.is_grantable.size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 5, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 5, datas));
     }
     return Status::OK();
 }
diff --git a/be/src/exec/schema_scanner/schema_tables_scanner.cpp 
b/be/src/exec/schema_scanner/schema_tables_scanner.cpp
index 61f67c0e590..375ceb2c470 100644
--- a/be/src/exec/schema_scanner/schema_tables_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_tables_scanner.cpp
@@ -150,9 +150,9 @@ Status 
SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) {
             for (int i = 0; i < table_num; ++i) {
                 datas[i] = &str_slot;
             }
-            static_cast<void>(fill_dest_column_for_range(block, 0, datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, datas));
         } else {
-            static_cast<void>(fill_dest_column_for_range(block, 0, 
null_datas));
+            RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, null_datas));
         }
     }
     // schema
@@ -162,7 +162,7 @@ Status 
SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) {
         for (int i = 0; i < table_num; ++i) {
             datas[i] = &str_slot;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 1, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 1, datas));
     }
     // name
     {
@@ -172,7 +172,7 @@ Status 
SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(src->c_str(), src->size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 2, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 2, datas));
     }
     // type
     {
@@ -182,7 +182,7 @@ Status 
SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(src->c_str(), src->size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 3, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 3, datas));
     }
     // engine
     {
@@ -197,12 +197,12 @@ Status 
SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 4, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 4, datas));
     }
     // version
-    { static_cast<void>(fill_dest_column_for_range(block, 5, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 5, null_datas)); }
     // row_format
-    { static_cast<void>(fill_dest_column_for_range(block, 6, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 6, null_datas)); }
     // rows
     {
         int64_t srcs[table_num];
@@ -215,7 +215,7 @@ Status 
SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 7, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 7, datas));
     }
     // avg_row_length
     {
@@ -229,7 +229,7 @@ Status 
SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 8, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 8, datas));
     }
     // data_length
     {
@@ -243,16 +243,16 @@ Status 
SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 9, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 9, datas));
     }
     // max_data_length
-    { static_cast<void>(fill_dest_column_for_range(block, 10, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 10, null_datas)); }
     // index_length
-    { static_cast<void>(fill_dest_column_for_range(block, 11, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 11, null_datas)); }
     // data_free
-    { static_cast<void>(fill_dest_column_for_range(block, 12, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 12, null_datas)); }
     // auto_increment
-    { static_cast<void>(fill_dest_column_for_range(block, 13, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 13, null_datas)); }
     // creation_time
     {
         VecDateTimeValue srcs[table_num];
@@ -270,7 +270,7 @@ Status 
SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 14, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 14, datas));
     }
     // update_time
     {
@@ -289,7 +289,7 @@ Status 
SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 15, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 15, datas));
     }
     // check_time
     {
@@ -308,7 +308,7 @@ Status 
SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 16, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 16, datas));
     }
     // collation
     {
@@ -323,12 +323,12 @@ Status 
SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) {
                 datas[i] = nullptr;
             }
         }
-        static_cast<void>(fill_dest_column_for_range(block, 17, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 17, datas));
     }
     // checksum
-    { static_cast<void>(fill_dest_column_for_range(block, 18, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 18, null_datas)); }
     // create_options
-    { static_cast<void>(fill_dest_column_for_range(block, 19, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 19, null_datas)); }
     // create_comment
     {
         StringRef strs[table_num];
@@ -337,7 +337,7 @@ Status 
SchemaTablesScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(src->c_str(), src->size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 20, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 20, datas));
     }
     return Status::OK();
 }
diff --git a/be/src/exec/schema_scanner/schema_user_privileges_scanner.cpp 
b/be/src/exec/schema_scanner/schema_user_privileges_scanner.cpp
index 1501e07a66e..b636ff65fd7 100644
--- a/be/src/exec/schema_scanner/schema_user_privileges_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_user_privileges_scanner.cpp
@@ -109,7 +109,7 @@ Status 
SchemaUserPrivilegesScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(priv_status.grantee.c_str(), 
priv_status.grantee.size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 0, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, datas));
     }
     // catalog
     // This value is always def.
@@ -119,7 +119,7 @@ Status 
SchemaUserPrivilegesScanner::_fill_block_impl(vectorized::Block* block) {
         for (int i = 0; i < privileges_num; ++i) {
             datas[i] = &str;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 1, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 1, datas));
     }
     // privilege type
     {
@@ -130,7 +130,7 @@ Status 
SchemaUserPrivilegesScanner::_fill_block_impl(vectorized::Block* block) {
                                 priv_status.privilege_type.size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 2, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 2, datas));
     }
     // is grantable
     {
@@ -140,7 +140,7 @@ Status 
SchemaUserPrivilegesScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(priv_status.is_grantable.c_str(), 
priv_status.is_grantable.size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 3, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 3, datas));
     }
     return Status::OK();
 }
diff --git a/be/src/exec/schema_scanner/schema_variables_scanner.cpp 
b/be/src/exec/schema_scanner/schema_variables_scanner.cpp
index 1713755d81f..491a11f2572 100644
--- a/be/src/exec/schema_scanner/schema_variables_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_variables_scanner.cpp
@@ -98,7 +98,7 @@ Status 
SchemaVariablesScanner::_fill_block_impl(vectorized::Block* block) {
             datas[idx] = strs + idx;
             ++idx;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 0, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, datas));
     }
     // value
     {
@@ -109,7 +109,7 @@ Status 
SchemaVariablesScanner::_fill_block_impl(vectorized::Block* block) {
             datas[idx] = strs + idx;
             ++idx;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 1, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 1, datas));
     }
     return Status::OK();
 }
diff --git a/be/src/exec/schema_scanner/schema_views_scanner.cpp 
b/be/src/exec/schema_scanner/schema_views_scanner.cpp
index 7619f72d1fc..7d9ce671a66 100644
--- a/be/src/exec/schema_scanner/schema_views_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_views_scanner.cpp
@@ -140,7 +140,7 @@ Status 
SchemaViewsScanner::_fill_block_impl(vectorized::Block* block) {
     std::vector<void*> datas(tables_num);
 
     // catalog
-    { static_cast<void>(fill_dest_column_for_range(block, 0, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, null_datas)); }
     // schema
     {
         std::string db_name = 
SchemaHelper::extract_db_name(_db_result.dbs[_db_index - 1]);
@@ -148,7 +148,7 @@ Status 
SchemaViewsScanner::_fill_block_impl(vectorized::Block* block) {
         for (int i = 0; i < tables_num; ++i) {
             datas[i] = &str;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 1, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 1, datas));
     }
     // name
     {
@@ -159,7 +159,7 @@ Status 
SchemaViewsScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(src->c_str(), src->size());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 2, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 2, datas));
     }
     // definition
     {
@@ -170,7 +170,7 @@ Status 
SchemaViewsScanner::_fill_block_impl(vectorized::Block* block) {
             strs[i] = StringRef(src->c_str(), src->length());
             datas[i] = strs + i;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 3, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 3, datas));
     }
     // check_option
     {
@@ -179,7 +179,7 @@ Status 
SchemaViewsScanner::_fill_block_impl(vectorized::Block* block) {
         for (int i = 0; i < tables_num; ++i) {
             datas[i] = &str;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 4, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 4, datas));
     }
     // is_updatable
     {
@@ -189,7 +189,7 @@ Status 
SchemaViewsScanner::_fill_block_impl(vectorized::Block* block) {
         for (int i = 0; i < tables_num; ++i) {
             datas[i] = &str;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 5, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 5, datas));
     }
     // definer
     {
@@ -199,7 +199,7 @@ Status 
SchemaViewsScanner::_fill_block_impl(vectorized::Block* block) {
         for (int i = 0; i < tables_num; ++i) {
             datas[i] = &str;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 6, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 6, datas));
     }
     // security_type
     {
@@ -209,7 +209,7 @@ Status 
SchemaViewsScanner::_fill_block_impl(vectorized::Block* block) {
         for (int i = 0; i < tables_num; ++i) {
             datas[i] = &str;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 7, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 7, datas));
     }
     // character_set_client
     {
@@ -219,10 +219,10 @@ Status 
SchemaViewsScanner::_fill_block_impl(vectorized::Block* block) {
         for (int i = 0; i < tables_num; ++i) {
             datas[i] = &str;
         }
-        static_cast<void>(fill_dest_column_for_range(block, 8, datas));
+        RETURN_IF_ERROR(fill_dest_column_for_range(block, 8, datas));
     }
     // collation_connection
-    { static_cast<void>(fill_dest_column_for_range(block, 9, null_datas)); }
+    { RETURN_IF_ERROR(fill_dest_column_for_range(block, 9, null_datas)); }
     return Status::OK();
 }
 
diff --git a/be/src/exprs/runtime_filter.cpp b/be/src/exprs/runtime_filter.cpp
index 96ca1552812..bb510f30e27 100644
--- a/be/src/exprs/runtime_filter.cpp
+++ b/be/src/exprs/runtime_filter.cpp
@@ -592,12 +592,12 @@ public:
         case RuntimeFilterType::MIN_FILTER:
         case RuntimeFilterType::MAX_FILTER:
         case RuntimeFilterType::MINMAX_FILTER: {
-            static_cast<void>(
+            RETURN_IF_ERROR(
                     
_context.minmax_func->merge(wrapper->_context.minmax_func.get(), _pool));
             break;
         }
         case RuntimeFilterType::BLOOM_FILTER: {
-            static_cast<void>(
+            RETURN_IF_ERROR(
                     
_context.bloom_filter_func->merge(wrapper->_context.bloom_filter_func.get()));
             break;
         }
@@ -622,7 +622,7 @@ public:
                     VLOG_DEBUG << " change runtime filter to bloom filter(id=" 
<< _filter_id
                                << ") because: already exist a bloom filter";
                     change_to_bloom_filter();
-                    static_cast<void>(_context.bloom_filter_func->merge(
+                    RETURN_IF_ERROR(_context.bloom_filter_func->merge(
                             wrapper->_context.bloom_filter_func.get()));
                 }
             } else {
@@ -635,7 +635,7 @@ public:
                     
wrapper->insert_to_bloom_filter(_context.bloom_filter_func.get());
                     // bloom filter merge bloom filter
                 } else {
-                    static_cast<void>(_context.bloom_filter_func->merge(
+                    RETURN_IF_ERROR(_context.bloom_filter_func->merge(
                             wrapper->_context.bloom_filter_func.get()));
                 }
             }
diff --git a/be/src/exprs/runtime_filter_slots.h 
b/be/src/exprs/runtime_filter_slots.h
index e0ff2cb0067..6c96b160551 100644
--- a/be/src/exprs/runtime_filter_slots.h
+++ b/be/src/exprs/runtime_filter_slots.h
@@ -47,7 +47,7 @@ public:
 
         auto ignore_local_filter = [state](int filter_id) {
             std::vector<IRuntimeFilter*> filters;
-            
static_cast<void>(state->runtime_filter_mgr()->get_consume_filters(filter_id, 
filters));
+            
RETURN_IF_ERROR(state->runtime_filter_mgr()->get_consume_filters(filter_id, 
filters));
             if (filters.empty()) {
                 throw Exception(ErrorCode::INTERNAL_ERROR, "filters empty, 
filter_id={}",
                                 filter_id);
@@ -56,6 +56,7 @@ public:
                 filter->set_ignored();
                 filter->signal();
             }
+            return Status::OK();
         };
 
         auto ignore_remote_filter = [](IRuntimeFilter* runtime_filter, 
std::string& msg) {
@@ -128,7 +129,7 @@ public:
                                << " ignore runtime filter(in filter id " << 
filter_desc.filter_id
                                << ") because: in_num(" << hash_table_size << 
") >= max_in_num("
                                << max_in_num << ")";
-                    ignore_local_filter(filter_desc.filter_id);
+                    
RETURN_IF_ERROR(ignore_local_filter(filter_desc.filter_id));
                     continue;
                 } else if (!is_in_filter && exists_in_filter) {
                     // do not create 'bloom filter' and 'minmax filter' when 
'in filter' has created
@@ -137,7 +138,7 @@ public:
                                << " ignore runtime filter("
                                << 
IRuntimeFilter::to_string(runtime_filter->type()) << " id "
                                << filter_desc.filter_id << ") because: already 
exists in filter";
-                    ignore_local_filter(filter_desc.filter_id);
+                    
RETURN_IF_ERROR(ignore_local_filter(filter_desc.filter_id));
                     continue;
                 }
             } else if (is_in_filter && over_max_in_num) {
@@ -243,13 +244,13 @@ public:
                 if (ret == context->runtime_filters.end()) {
                     return Status::Aborted("invalid runtime filter id: {}", 
filter_id);
                 }
-                
static_cast<void>(filter->copy_from_shared_context(ret->second));
+                RETURN_IF_ERROR(filter->copy_from_shared_context(ret->second));
             }
         }
         return Status::OK();
     }
 
-    bool empty() { return !_runtime_filters.size(); }
+    bool empty() { return _runtime_filters.empty(); }
 
 private:
     const std::vector<std::shared_ptr<vectorized::VExprContext>>& 
_build_expr_context;
diff --git a/be/src/http/action/pad_rowset_action.cpp 
b/be/src/http/action/pad_rowset_action.cpp
index c14458438cc..95164f53fa5 100644
--- a/be/src/http/action/pad_rowset_action.cpp
+++ b/be/src/http/action/pad_rowset_action.cpp
@@ -116,7 +116,7 @@ Status PadRowsetAction::_pad_rowset(TabletSharedPtr tablet, 
const Version& versi
     {
         std::unique_lock wlock(tablet->get_header_lock());
         SCOPED_SIMPLE_TRACE_IF_TIMEOUT(TRACE_TABLET_LOCK_THRESHOLD);
-        static_cast<void>(tablet->modify_rowsets(to_add, to_delete));
+        RETURN_IF_ERROR(tablet->modify_rowsets(to_add, to_delete));
         tablet->save_meta();
     }
 
diff --git a/be/src/io/file_factory.cpp b/be/src/io/file_factory.cpp
index afbf18c189a..4648309fc57 100644
--- a/be/src/io/file_factory.cpp
+++ b/be/src/io/file_factory.cpp
@@ -152,8 +152,8 @@ Status FileFactory::create_pipe_reader(const TUniqueId& 
load_id, io::FileReaderS
                 io::kMaxPipeBufferedBytes /* max_buffered_bytes */, 64 * 1024 
/* min_chunk_size */,
                 stream_load_ctx->schema_buffer->pos /* total_length */);
         stream_load_ctx->schema_buffer->flip();
-        static_cast<void>(pipe->append(stream_load_ctx->schema_buffer));
-        static_cast<void>(pipe->finish());
+        RETURN_IF_ERROR(pipe->append(stream_load_ctx->schema_buffer));
+        RETURN_IF_ERROR(pipe->finish());
         *file_reader = std::move(pipe);
     } else {
         *file_reader = stream_load_ctx->pipe;
diff --git a/be/src/io/fs/multi_table_pipe.cpp 
b/be/src/io/fs/multi_table_pipe.cpp
index 4af4eb08dc2..3f2f1d19914 100644
--- a/be/src/io/fs/multi_table_pipe.cpp
+++ b/be/src/io/fs/multi_table_pipe.cpp
@@ -214,13 +214,13 @@ Status MultiTablePipe::exec_plans(ExecEnv* exec_env, 
std::vector<ExecParam> para
         }
 
         if constexpr (std::is_same_v<ExecParam, TExecPlanFragmentParams>) {
-            static_cast<void>(
+            RETURN_IF_ERROR(
                     putPipe(plan.params.fragment_instance_id, 
_planned_pipes[plan.table_name]));
             LOG(INFO) << "fragment_instance_id=" << 
plan.params.fragment_instance_id
                       << " table=" << plan.table_name;
         } else if constexpr (std::is_same_v<ExecParam, 
TPipelineFragmentParams>) {
             auto pipe_id = calculate_pipe_id(plan.query_id, plan.fragment_id);
-            static_cast<void>(putPipe(pipe_id, 
_planned_pipes[plan.table_name]));
+            RETURN_IF_ERROR(putPipe(pipe_id, _planned_pipes[plan.table_name]));
             LOG(INFO) << "pipe_id=" << pipe_id << "table=" << plan.table_name;
         } else {
             LOG(WARNING) << "illegal exec param type, need 
`TExecPlanFragmentParams` or "
@@ -228,7 +228,7 @@ Status MultiTablePipe::exec_plans(ExecEnv* exec_env, 
std::vector<ExecParam> para
             CHECK(false);
         }
 
-        static_cast<void>(exec_env->fragment_mgr()->exec_plan_fragment(
+        RETURN_IF_ERROR(exec_env->fragment_mgr()->exec_plan_fragment(
                 plan, [this](RuntimeState* state, Status* status) {
                     {
                         std::lock_guard<std::mutex> 
l(_tablet_commit_infos_lock);
diff --git a/be/src/io/fs/s3_file_bufferpool.cpp 
b/be/src/io/fs/s3_file_bufferpool.cpp
index b421bfb1f71..42459914d31 100644
--- a/be/src/io/fs/s3_file_bufferpool.cpp
+++ b/be/src/io/fs/s3_file_bufferpool.cpp
@@ -102,7 +102,7 @@ Status UploadFileBuffer::append_data(const Slice& data) {
                     break;
                 }
                 if (_index_offset != 0) {
-                    
static_cast<void>(segment->change_cache_type_self(CacheType::INDEX));
+                    
RETURN_IF_ERROR(segment->change_cache_type_self(CacheType::INDEX));
                 }
             }
             // if cache_is_not_enough, cannot use it !
diff --git a/be/src/io/fs/s3_file_writer.cpp b/be/src/io/fs/s3_file_writer.cpp
index 0c34a9cc5e7..aef406a03ce 100644
--- a/be/src/io/fs/s3_file_writer.cpp
+++ b/be/src/io/fs/s3_file_writer.cpp
@@ -195,7 +195,7 @@ Status S3FileWriter::close() {
     }
     Defer defer {[&]() { _closed = true; }};
     if (_failed) {
-        static_cast<void>(abort());
+        RETURN_IF_ERROR(abort());
         return _st;
     }
     VLOG_DEBUG << "S3FileWriter::close, path: " << _path.native();
@@ -211,7 +211,7 @@ Status S3FileWriter::close() {
         _pending_buf = nullptr;
     }
     DBUG_EXECUTE_IF("s3_file_writer::close", {
-        static_cast<void>(_complete());
+        RETURN_IF_ERROR(_complete());
         return Status::InternalError("failed to close s3 file writer");
     });
     RETURN_IF_ERROR(_complete());
diff --git a/be/src/io/fs/stream_load_pipe.cpp 
b/be/src/io/fs/stream_load_pipe.cpp
index a91abc80bd9..25be598e90e 100644
--- a/be/src/io/fs/stream_load_pipe.cpp
+++ b/be/src/io/fs/stream_load_pipe.cpp
@@ -229,7 +229,7 @@ Status StreamLoadPipe::_append(const ByteBufferPtr& buf, 
size_t proto_byte_size)
 Status StreamLoadPipe::finish() {
     if (_write_buf != nullptr) {
         _write_buf->flip();
-        static_cast<void>(_append(_write_buf));
+        RETURN_IF_ERROR(_append(_write_buf));
         _write_buf.reset();
     }
     {
diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp
index c4a988f6ec3..3a800fa1f3a 100644
--- a/be/src/olap/compaction.cpp
+++ b/be/src/olap/compaction.cpp
@@ -115,7 +115,7 @@ Status Compaction::do_compaction(int64_t permits) {
     if (config::enable_compaction_checksum) {
         EngineChecksumTask checksum_task(_tablet->tablet_id(), 
_tablet->schema_hash(),
                                          _input_rowsets.back()->end_version(), 
&checksum_before);
-        static_cast<void>(checksum_task.execute());
+        RETURN_IF_ERROR(checksum_task.execute());
     }
 
     _tablet->data_dir()->disks_compaction_score_increment(permits);
@@ -127,7 +127,7 @@ Status Compaction::do_compaction(int64_t permits) {
     if (config::enable_compaction_checksum) {
         EngineChecksumTask checksum_task(_tablet->tablet_id(), 
_tablet->schema_hash(),
                                          _input_rowsets.back()->end_version(), 
&checksum_after);
-        static_cast<void>(checksum_task.execute());
+        RETURN_IF_ERROR(checksum_task.execute());
         if (checksum_before != checksum_after) {
             LOG(WARNING) << "Compaction tablet=" << _tablet->tablet_id()
                          << " checksum not consistent"
@@ -210,7 +210,7 @@ Status Compaction::do_compact_ordered_rowsets() {
         seg_id += rowset->num_segments();
 
         std::vector<KeyBoundsPB> key_bounds;
-        static_cast<void>(rowset->get_segments_key_bounds(&key_bounds));
+        RETURN_IF_ERROR(rowset->get_segments_key_bounds(&key_bounds));
         segment_key_bounds.insert(segment_key_bounds.end(), 
key_bounds.begin(), key_bounds.end());
     }
     // build output rowset
diff --git a/be/src/olap/data_dir.cpp b/be/src/olap/data_dir.cpp
index 173f19833c7..c6c456153dd 100644
--- a/be/src/olap/data_dir.cpp
+++ b/be/src/olap/data_dir.cpp
@@ -369,7 +369,7 @@ Status DataDir::load() {
     // if one rowset load failed, then the total data dir will not be loaded
 
     // necessarily check incompatible old format. when there are old metas, it 
may load to data missing
-    static_cast<void>(_check_incompatible_old_format_tablet());
+    RETURN_IF_ERROR(_check_incompatible_old_format_tablet());
 
     std::vector<RowsetMetaSharedPtr> dir_rowset_metas;
     LOG(INFO) << "begin loading rowset from meta";
@@ -411,7 +411,7 @@ Status DataDir::load() {
                 rowset_meta->serialize(&result);
                 std::string key =
                         ROWSET_PREFIX + tablet_uid.to_string() + "_" + 
rowset_id.to_string();
-                static_cast<void>(_meta->put(META_COLUMN_FAMILY_INDEX, key, 
result));
+                RETURN_IF_ERROR(_meta->put(META_COLUMN_FAMILY_INDEX, key, 
result));
             }
         }
         dir_rowset_metas.push_back(rowset_meta);
@@ -481,8 +481,8 @@ Status DataDir::load() {
     for (int64_t tablet_id : tablet_ids) {
         TabletSharedPtr tablet = _tablet_manager->get_tablet(tablet_id);
         if (tablet && tablet->set_tablet_schema_into_rowset_meta()) {
-            static_cast<void>(TabletMetaManager::save(
-                    this, tablet->tablet_id(), tablet->schema_hash(), 
tablet->tablet_meta()));
+            RETURN_IF_ERROR(TabletMetaManager::save(this, tablet->tablet_id(),
+                                                    tablet->schema_hash(), 
tablet->tablet_meta()));
         }
     }
 
@@ -499,7 +499,7 @@ Status DataDir::load() {
                 pending_publish_info_pb.transaction_id(), true);
         return true;
     };
-    static_cast<void>(
+    RETURN_IF_ERROR(
             TabletMetaManager::traverse_pending_publish(_meta, 
load_pending_publish_info_func));
 
     // traverse rowset
@@ -531,9 +531,9 @@ Status DataDir::load() {
             rowset_meta->tablet_uid() == tablet->tablet_uid()) {
             if (!rowset_meta->tablet_schema()) {
                 rowset_meta->set_tablet_schema(tablet->tablet_schema());
-                static_cast<void>(RowsetMetaManager::save(_meta, 
rowset_meta->tablet_uid(),
-                                                          
rowset_meta->rowset_id(),
-                                                          
rowset_meta->get_rowset_pb()));
+                RETURN_IF_ERROR(RowsetMetaManager::save(_meta, 
rowset_meta->tablet_uid(),
+                                                        
rowset_meta->rowset_id(),
+                                                        
rowset_meta->get_rowset_pb()));
             }
             Status commit_txn_status = _txn_manager->commit_txn(
                     _meta, rowset_meta->partition_id(), rowset_meta->txn_id(),
@@ -553,9 +553,9 @@ Status DataDir::load() {
                    rowset_meta->tablet_uid() == tablet->tablet_uid()) {
             if (!rowset_meta->tablet_schema()) {
                 rowset_meta->set_tablet_schema(tablet->tablet_schema());
-                static_cast<void>(RowsetMetaManager::save(_meta, 
rowset_meta->tablet_uid(),
-                                                          
rowset_meta->rowset_id(),
-                                                          
rowset_meta->get_rowset_pb()));
+                RETURN_IF_ERROR(RowsetMetaManager::save(_meta, 
rowset_meta->tablet_uid(),
+                                                        
rowset_meta->rowset_id(),
+                                                        
rowset_meta->get_rowset_pb()));
             }
             Status publish_status = tablet->add_rowset(rowset);
             if (!publish_status && 
!publish_status.is<PUSH_VERSION_ALREADY_EXIST>()) {
@@ -614,7 +614,7 @@ Status DataDir::load() {
         }
         return true;
     };
-    static_cast<void>(TabletMetaManager::traverse_delete_bitmap(_meta, 
load_delete_bitmap_func));
+    RETURN_IF_ERROR(TabletMetaManager::traverse_delete_bitmap(_meta, 
load_delete_bitmap_func));
 
     // At startup, we only count these invalid rowset, but do not actually 
delete it.
     // The actual delete operation is in 
StorageEngine::_clean_unused_rowset_metas,
@@ -933,7 +933,7 @@ Status DataDir::move_to_trash(const std::string& 
tablet_path) {
     if (sub_files.empty()) {
         LOG(INFO) << "remove empty dir " << source_parent_dir;
         // no need to exam return status
-        
static_cast<void>(io::global_local_filesystem()->delete_directory(source_parent_dir));
+        
RETURN_IF_ERROR(io::global_local_filesystem()->delete_directory(source_parent_dir));
     }
 
     return Status::OK();
diff --git a/be/src/olap/full_compaction.cpp b/be/src/olap/full_compaction.cpp
index d1681a10c7a..393bbd8c579 100644
--- a/be/src/olap/full_compaction.cpp
+++ b/be/src/olap/full_compaction.cpp
@@ -157,7 +157,7 @@ Status 
FullCompaction::_full_compaction_update_delete_bitmap(const RowsetSharedP
     int64_t max_version = _tablet->max_version().second;
     DCHECK(max_version >= rowset->version().second);
     if (max_version > rowset->version().second) {
-        static_cast<void>(_tablet->capture_consistent_rowsets(
+        RETURN_IF_ERROR(_tablet->capture_consistent_rowsets(
                 {rowset->version().second + 1, max_version}, &tmp_rowsets));
     }
 
diff --git a/be/src/olap/match_predicate.cpp b/be/src/olap/match_predicate.cpp
index 12fa2ea55cc..561bc135516 100644
--- a/be/src/olap/match_predicate.cpp
+++ b/be/src/olap/match_predicate.cpp
@@ -64,7 +64,7 @@ Status MatchPredicate::evaluate(const Schema& schema, 
InvertedIndexIterator* ite
     } else if (column_desc->type() == FieldType::OLAP_FIELD_TYPE_ARRAY &&
                
is_numeric_type(column_desc->get_sub_field(0)->type_info()->type())) {
         char buf[column_desc->get_sub_field(0)->type_info()->size()];
-        static_cast<void>(column_desc->get_sub_field(0)->from_string(buf, 
_value));
+        RETURN_IF_ERROR(column_desc->get_sub_field(0)->from_string(buf, 
_value));
         RETURN_IF_ERROR(iterator->read_from_inverted_index(
                 column_desc->name(), buf, inverted_index_query_type, num_rows, 
&roaring, true));
     }
diff --git a/be/src/olap/merger.cpp b/be/src/olap/merger.cpp
index ce3dce18e51..82f1662d010 100644
--- a/be/src/olap/merger.cpp
+++ b/be/src/olap/merger.cpp
@@ -351,9 +351,9 @@ Status Merger::vertical_merge_rowsets(TabletSharedPtr 
tablet, ReaderType reader_
                 tablet, reader_type, tablet_schema, is_key, column_groups[i], 
&row_sources_buf,
                 src_rowset_readers, dst_rowset_writer, max_rows_per_segment, 
stats_output));
         if (is_key) {
-            static_cast<void>(row_sources_buf.flush());
+            RETURN_IF_ERROR(row_sources_buf.flush());
         }
-        static_cast<void>(row_sources_buf.seek_to_begin());
+        RETURN_IF_ERROR(row_sources_buf.seek_to_begin());
     }
 
     // finish compact, build output rowset
diff --git a/be/src/olap/push_handler.cpp b/be/src/olap/push_handler.cpp
index 048a83979e2..4f8676d674a 100644
--- a/be/src/olap/push_handler.cpp
+++ b/be/src/olap/push_handler.cpp
@@ -86,7 +86,7 @@ Status 
PushHandler::process_streaming_ingestion(TabletSharedPtr tablet, const TP
     Status res = Status::OK();
     _request = request;
 
-    static_cast<void>(DescriptorTbl::create(&_pool, _request.desc_tbl, 
&_desc_tbl));
+    RETURN_IF_ERROR(DescriptorTbl::create(&_pool, _request.desc_tbl, 
&_desc_tbl));
 
     res = _do_streaming_ingestion(tablet, request, push_type, tablet_info_vec);
 
@@ -95,7 +95,7 @@ Status 
PushHandler::process_streaming_ingestion(TabletSharedPtr tablet, const TP
             TTabletInfo tablet_info;
             tablet_info.tablet_id = tablet->tablet_id();
             tablet_info.schema_hash = tablet->schema_hash();
-            static_cast<void>(
+            RETURN_IF_ERROR(
                     
StorageEngine::instance()->tablet_manager()->report_tablet_info(&tablet_info));
             tablet_info_vec->push_back(tablet_info);
         }
@@ -317,7 +317,7 @@ Status PushHandler::_convert_v2(TabletSharedPtr cur_tablet, 
RowsetSharedPtr* cur
             }
 
             reader->print_profile();
-            static_cast<void>(reader->close());
+            RETURN_IF_ERROR(reader->close());
         }
 
         if (!res.ok()) {
@@ -664,8 +664,8 @@ Status PushBrokerReader::_get_next_reader() {
         std::unordered_map<std::string, std::tuple<std::string, const 
SlotDescriptor*>>
                 partition_columns;
         std::unordered_map<std::string, vectorized::VExprContextSPtr> 
missing_columns;
-        static_cast<void>(_cur_reader->get_columns(&_name_to_col_type, 
&_missing_cols));
-        static_cast<void>(_cur_reader->set_fill_columns(partition_columns, 
missing_columns));
+        RETURN_IF_ERROR(_cur_reader->get_columns(&_name_to_col_type, 
&_missing_cols));
+        RETURN_IF_ERROR(_cur_reader->set_fill_columns(partition_columns, 
missing_columns));
         break;
     }
     default:
diff --git a/be/src/olap/schema_change.cpp b/be/src/olap/schema_change.cpp
index f2dc6fa4c32..2e732b27ac2 100644
--- a/be/src/olap/schema_change.cpp
+++ b/be/src/olap/schema_change.cpp
@@ -171,7 +171,7 @@ public:
 
                     if (i == rows - 1 || finalized_block.rows() == 
ALTER_TABLE_BATCH_SIZE) {
                         *merged_rows -= finalized_block.rows();
-                        
static_cast<void>(rowset_writer->add_block(&finalized_block));
+                        
RETURN_IF_ERROR(rowset_writer->add_block(&finalized_block));
                         finalized_block.clear_column_data();
                     }
                 }
@@ -203,7 +203,7 @@ public:
                         column->insert_from(*row_ref.get_column(idx), 
row_ref.position);
                     }
                 }
-                static_cast<void>(rowset_writer->add_block(&finalized_block));
+                RETURN_IF_ERROR(rowset_writer->add_block(&finalized_block));
                 finalized_block.clear_column_data();
             }
         }
@@ -304,11 +304,11 @@ Status BlockChanger::change_block(vectorized::Block* 
ref_block,
             
RETURN_IF_ERROR(_check_cast_valid(ref_block->get_by_position(idx).column,
                                               
ref_block->get_by_position(result_column_id).column,
                                               _type));
-            swap_idx_list.push_back({result_column_id, idx});
+            swap_idx_list.emplace_back(result_column_id, idx);
         } else if (_schema_mapping[idx].ref_column < 0) {
             if (_type != ROLLUP) {
                 // new column, write default value
-                auto value = _schema_mapping[idx].default_value;
+                auto* value = _schema_mapping[idx].default_value;
                 auto column = 
new_block->get_by_position(idx).column->assume_mutable();
                 if (value->is_null()) {
                     DCHECK(column->is_nullable());
@@ -325,7 +325,7 @@ Status BlockChanger::change_block(vectorized::Block* 
ref_block,
             }
         } else {
             // same type, just swap column
-            swap_idx_list.push_back({_schema_mapping[idx].ref_column, idx});
+            swap_idx_list.emplace_back(_schema_mapping[idx].ref_column, idx);
         }
     }
 
@@ -482,9 +482,12 @@ Status 
VSchemaChangeDirectly::_inner_process(RowsetReaderSharedPtr rowset_reader
                 
vectorized::Block::create_unique(new_tablet->tablet_schema()->create_block());
         auto ref_block = 
vectorized::Block::create_unique(base_tablet_schema->create_block());
 
-        static_cast<void>(rowset_reader->next_block(ref_block.get()));
-        if (ref_block->rows() == 0) {
-            break;
+        auto st = rowset_reader->next_block(ref_block.get());
+        if (!st) {
+            if (st.is<ErrorCode::END_OF_FILE>()) {
+                break;
+            }
+            return st;
         }
 
         RETURN_IF_ERROR(_changer.change_block(ref_block.get(), 
new_block.get()));
@@ -552,9 +555,12 @@ Status 
VSchemaChangeWithSorting::_inner_process(RowsetReaderSharedPtr rowset_rea
 
     do {
         auto ref_block = 
vectorized::Block::create_unique(base_tablet_schema->create_block());
-        static_cast<void>(rowset_reader->next_block(ref_block.get()));
-        if (ref_block->rows() == 0) {
-            break;
+        auto st = rowset_reader->next_block(ref_block.get());
+        if (!st) {
+            if (st.is<ErrorCode::END_OF_FILE>()) {
+                break;
+            }
+            return st;
         }
 
         RETURN_IF_ERROR(_changer.change_block(ref_block.get(), 
new_block.get()));
@@ -793,7 +799,7 @@ Status 
SchemaChangeHandler::_do_process_alter_tablet_v2(const TAlterTabletReqV2&
                 }
             }
             std::vector<RowsetSharedPtr> empty_vec;
-            static_cast<void>(new_tablet->modify_rowsets(empty_vec, 
rowsets_to_delete));
+            RETURN_IF_ERROR(new_tablet->modify_rowsets(empty_vec, 
rowsets_to_delete));
             // inherit cumulative_layer_point from base_tablet
             // check if new_tablet.ce_point > base_tablet.ce_point?
             new_tablet->set_cumulative_layer_point(-1);
@@ -810,7 +816,7 @@ Status 
SchemaChangeHandler::_do_process_alter_tablet_v2(const TAlterTabletReqV2&
             }
 
             // acquire data sources correspond to history versions
-            
static_cast<void>(base_tablet->capture_rs_readers(versions_to_be_changed, 
&rs_splits));
+            
RETURN_IF_ERROR(base_tablet->capture_rs_readers(versions_to_be_changed, 
&rs_splits));
             if (rs_splits.empty()) {
                 res = Status::Error<ALTER_DELTA_DOES_NOT_EXISTS>(
                         "fail to acquire all data sources. version_num={}, 
data_source_num={}",
@@ -859,7 +865,7 @@ Status 
SchemaChangeHandler::_do_process_alter_tablet_v2(const TAlterTabletReqV2&
         }
         SchemaChangeParams sc_params;
 
-        static_cast<void>(
+        RETURN_IF_ERROR(
                 DescriptorTbl::create(&sc_params.pool, request.desc_tbl, 
&sc_params.desc_tbl));
         sc_params.base_tablet = base_tablet;
         sc_params.new_tablet = new_tablet;
@@ -1339,8 +1345,8 @@ Status 
SchemaChangeHandler::_init_column_mapping(ColumnMapping* column_mapping,
     if (column_schema.is_nullable() && value.length() == 0) {
         column_mapping->default_value->set_null();
     } else {
-        static_cast<void>(column_mapping->default_value->from_string(
-                value, column_schema.precision(), column_schema.frac()));
+        RETURN_IF_ERROR(column_mapping->default_value->from_string(value, 
column_schema.precision(),
+                                                                   
column_schema.frac()));
     }
 
     return Status::OK();


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

Reply via email to