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

airborne 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 9031e7cf822 [be](chore) remove useless Schema in push handler (#58300)
9031e7cf822 is described below

commit 9031e7cf8220e1fc66f243b4245df57baa3abf95
Author: yiguolei <[email protected]>
AuthorDate: Mon Nov 24 20:51:23 2025 +0800

    [be](chore) remove useless Schema in push handler (#58300)
---
 be/src/olap/push_handler.cpp | 15 +++------------
 be/src/olap/push_handler.h   |  4 +---
 2 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/be/src/olap/push_handler.cpp b/be/src/olap/push_handler.cpp
index 1a37e9924fc..893078df6e1 100644
--- a/be/src/olap/push_handler.cpp
+++ b/be/src/olap/push_handler.cpp
@@ -47,7 +47,6 @@
 #include "olap/rowset/pending_rowset_helper.h"
 #include "olap/rowset/rowset_writer.h"
 #include "olap/rowset/rowset_writer_context.h"
-#include "olap/schema.h"
 #include "olap/storage_engine.h"
 #include "olap/tablet.h"
 #include "olap/tablet_manager.h"
@@ -258,17 +257,9 @@ Status PushHandler::_convert_v2(TabletSharedPtr 
cur_tablet, RowsetSharedPtr* cur
         }
         // For push load, this tablet maybe not need push data, so that the 
path maybe empty
         if (!path.empty()) {
-            // init schema
-            std::unique_ptr<Schema> schema(new (std::nothrow) 
Schema(tablet_schema));
-            if (schema == nullptr) {
-                st = Status::Error<MEM_ALLOC_FAILED>("fail to create schema. 
tablet={}",
-                                                     cur_tablet->tablet_id());
-                break;
-            }
-
             // init Reader
-            std::unique_ptr<PushBrokerReader> reader = 
PushBrokerReader::create_unique(
-                    schema.get(), _request.broker_scan_range, 
_request.desc_tbl);
+            std::unique_ptr<PushBrokerReader> reader =
+                    
PushBrokerReader::create_unique(_request.broker_scan_range, _request.desc_tbl);
             st = reader->init();
             if (reader == nullptr || !st.ok()) {
                 st = Status::Error<PUSH_INIT_ERROR>("fail to init reader. 
st={}, tablet={}", st,
@@ -328,7 +319,7 @@ Status PushHandler::_convert_v2(TabletSharedPtr cur_tablet, 
RowsetSharedPtr* cur
     return st;
 }
 
-PushBrokerReader::PushBrokerReader(const Schema* schema, const 
TBrokerScanRange& t_scan_range,
+PushBrokerReader::PushBrokerReader(const TBrokerScanRange& t_scan_range,
                                    const TDescriptorTable& t_desc_tbl)
         : _ready(false),
           _eof(false),
diff --git a/be/src/olap/push_handler.h b/be/src/olap/push_handler.h
index bb5fa2ff1da..c441839763d 100644
--- a/be/src/olap/push_handler.h
+++ b/be/src/olap/push_handler.h
@@ -42,7 +42,6 @@ namespace doris {
 
 class DescriptorTbl;
 class RuntimeProfile;
-class Schema;
 class TBrokerScanRange;
 class TDescriptorTable;
 class TTabletInfo;
@@ -90,8 +89,7 @@ class PushBrokerReader {
     ENABLE_FACTORY_CREATOR(PushBrokerReader);
 
 public:
-    PushBrokerReader(const Schema* schema, const TBrokerScanRange& 
t_scan_range,
-                     const TDescriptorTable& t_desc_tbl);
+    PushBrokerReader(const TBrokerScanRange& t_scan_range, const 
TDescriptorTable& t_desc_tbl);
     ~PushBrokerReader() = default;
     Status init();
     Status next(vectorized::Block* block);


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

Reply via email to