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

dataroaring 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 e3fcc877823 branch-3.0: [Fix](ShortCircuit) fix crash when enable 
`skip_delete_sign` #50941 (#50965)
e3fcc877823 is described below

commit e3fcc8778239a07403cd0518ae6126fd6602df24
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri May 16 19:05:26 2025 +0800

    branch-3.0: [Fix](ShortCircuit) fix crash when enable `skip_delete_sign` 
#50941 (#50965)
    
    Cherry-picked from #50941
    
    Co-authored-by: lihangyu <lihan...@selectdb.com>
---
 be/src/service/point_query_executor.cpp               |   8 +++++++-
 .../data/point_query_p0/test_point_query.out          | Bin 9896 -> 9920 bytes
 .../suites/point_query_p0/test_point_query.groovy     |   7 +++++++
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/be/src/service/point_query_executor.cpp 
b/be/src/service/point_query_executor.cpp
index 2079a496f39..ee03495ffbd 100644
--- a/be/src/service/point_query_executor.cpp
+++ b/be/src/service/point_query_executor.cpp
@@ -137,8 +137,12 @@ Status Reusable::init(const TDescriptorTable& t_desc_tbl, 
const std::vector<TExp
     _create_timestamp = butil::gettimeofday_ms();
     _data_type_serdes = 
vectorized::create_data_type_serdes(tuple_desc()->slots());
     _col_default_values.resize(tuple_desc()->slots().size());
+    bool has_delete_sign = false;
     for (int i = 0; i < tuple_desc()->slots().size(); ++i) {
         auto* slot = tuple_desc()->slots()[i];
+        if (slot->col_name() == DELETE_SIGN) {
+            has_delete_sign = true;
+        }
         _col_uid_to_idx[slot->col_unique_id()] = i;
         _col_default_values[i] = slot->col_default_value();
     }
@@ -150,7 +154,9 @@ Status Reusable::init(const TDescriptorTable& t_desc_tbl, 
const std::vector<TExp
     }
 
     // get the delete sign idx in block
-    _delete_sign_idx = 
_col_uid_to_idx[schema.columns()[schema.delete_sign_idx()]->unique_id()];
+    if (has_delete_sign) {
+        _delete_sign_idx = 
_col_uid_to_idx[schema.columns()[schema.delete_sign_idx()]->unique_id()];
+    }
 
     if (schema.have_column(BeConsts::ROW_STORE_COL)) {
         const auto& column = 
*DORIS_TRY(schema.column(BeConsts::ROW_STORE_COL));
diff --git a/regression-test/data/point_query_p0/test_point_query.out 
b/regression-test/data/point_query_p0/test_point_query.out
index 30e1198451d..75822c3cf88 100644
Binary files a/regression-test/data/point_query_p0/test_point_query.out and 
b/regression-test/data/point_query_p0/test_point_query.out differ
diff --git a/regression-test/suites/point_query_p0/test_point_query.groovy 
b/regression-test/suites/point_query_p0/test_point_query.groovy
index 0463d9aa8f7..f2b22064d9c 100644
--- a/regression-test/suites/point_query_p0/test_point_query.groovy
+++ b/regression-test/suites/point_query_p0/test_point_query.groovy
@@ -336,7 +336,14 @@ suite("test_point_query", "nonConcurrent") {
     } 
     qt_sql "select * from table_3821461 where col1 = 10 and col2 = 20 and loc3 
= 'aabc';"
     sql "delete from table_3821461 where col1 = 10 and col2 = 20 and loc3 = 
'aabc';"
+    // read delete sign
     qt_sql "select * from table_3821461 where col1 = 10 and col2 = 20 and loc3 
= 'aabc';"
+
+    // skip delete sign
+    sql """set skip_delete_bitmap=true; set skip_delete_sign=true;"""
+    qt_sql "select * from table_3821461 where col1 = 10 and col2 = 20 and loc3 
= 'aabc';"
+    sql """set skip_delete_bitmap=false; set skip_delete_sign=false;"""
+
     sql "update table_3821461 set value = 'update value' where col1 = -10 or 
col1 = 20;"
     qt_sql """select * from table_3821461 where col1 = -10 and col2 = 20 and 
loc3 = 'aabc'"""
 


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

Reply via email to