eldenmoon commented on code in PR #64205:
URL: https://github.com/apache/doris/pull/64205#discussion_r3410908842


##########
be/src/storage/segment/variant/variant_column_reader.cpp:
##########
@@ -192,9 +192,15 @@ bool 
VariantColumnReader::is_exceeded_sparse_column_limit() const {
 }
 
 bool VariantColumnReader::_is_exceeded_sparse_column_limit_unlocked() const {
-    bool exceeded_sparse_column_limit = 
!_statistics->sparse_column_non_null_size.empty() &&
-                                        
_statistics->sparse_column_non_null_size.size() >=
-                                                
_variant_sparse_column_statistics_size;
+    const bool has_sparse_reader =
+            _binary_column_reader != nullptr &&
+            (_binary_column_reader->get_type() == 
BinaryColumnType::SINGLE_SPARSE ||
+             _binary_column_reader->get_type() == 
BinaryColumnType::MULTIPLE_SPARSE);
+    const bool exceeded_sparse_column_limit =
+            (_variant_sparse_column_statistics_size == 0 && has_sparse_reader) 
||

Review Comment:
   这里不能出现_variant_sparse_column_statistics_size == 0, 这是不允许的



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to