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

airborne pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 5b44e2840ff [fix] (build index) fix build index coredump (#43246) 
(#43298)
5b44e2840ff is described below

commit 5b44e2840ff9a1879a18b6bce69f2c77fe33878e
Author: Sun Chenyang <csun5...@gmail.com>
AuthorDate: Wed Nov 6 16:00:35 2024 +0800

    [fix] (build index) fix build index coredump (#43246) (#43298)
    
    pick from master: #43246
---
 be/src/olap/task/index_builder.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/be/src/olap/task/index_builder.cpp 
b/be/src/olap/task/index_builder.cpp
index 031748b0d79..ea7ca76551b 100644
--- a/be/src/olap/task/index_builder.cpp
+++ b/be/src/olap/task/index_builder.cpp
@@ -363,8 +363,10 @@ Status 
IndexBuilder::handle_single_rowset(RowsetMetaSharedPtr output_rowset_meta
                 auto column_name = inverted_index.columns[0];
                 auto column_idx = 
output_rowset_schema->field_index(column_name);
                 if (column_idx < 0) {
-                    column_idx =
-                            
output_rowset_schema->field_index(inverted_index.column_unique_ids[0]);
+                    if (!inverted_index.column_unique_ids.empty()) {
+                        column_idx = output_rowset_schema->field_index(
+                                inverted_index.column_unique_ids[0]);
+                    }
                     if (column_idx < 0) {
                         LOG(WARNING) << "referenced column was missing. "
                                      << "[column=" << column_name


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to