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

eldenmoon pushed a commit to branch variant-sparse
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 77f210f93fbc159855418762b0bc4897e62cd206
Author: lihangyu <lihan...@selectdb.com>
AuthorDate: Thu Mar 6 14:33:56 2025 +0800

    fix column is both the prefix of sparse column and subcolumn (#48737)
---
 be/src/olap/rowset/segment_v2/column_reader.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/be/src/olap/rowset/segment_v2/column_reader.cpp 
b/be/src/olap/rowset/segment_v2/column_reader.cpp
index d193216a7a2..f29e603c379 100644
--- a/be/src/olap/rowset/segment_v2/column_reader.cpp
+++ b/be/src/olap/rowset/segment_v2/column_reader.cpp
@@ -454,7 +454,9 @@ Status VariantColumnReader::new_iterator(ColumnIterator** 
iterator, const Tablet
             
_statistics->sparse_column_non_null_size.lower_bound(prefix)->first.starts_with(prefix);
     // if prefix exists in sparse column, read sparse column with hierarchical 
reader
     if (prefix_existed_in_sparse_column) {
-        return _create_hierarchical_reader(iterator, relative_path, nullptr, 
root);
+        // Example {"b" : {"c":456,"e":7.111}}
+        // b.c is sparse column, b.e is subcolumn, so b is both the prefix of 
sparse column and subcolumn
+        return _create_hierarchical_reader(iterator, relative_path, node, 
root);
     }
 
     // if path exists in sparse column, read sparse column with extract reader


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

Reply via email to