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


##########
be/src/core/column/column_variant.cpp:
##########
@@ -1835,6 +1843,12 @@ bool ColumnVariant::is_visible_root_value(size_t nrow) 
const {
         }
     }
 
+    const auto& sparse_column_map = assert_cast<const 
ColumnMap&>(*serialized_sparse_column);
+    const auto& sparse_offsets = sparse_column_map.get_offsets();
+    if (sparse_offsets[nrow - 1] != sparse_offsets[nrow]) {
+        return false;
+    }

Review Comment:
   This negative index is intentional for Doris offsets: Offsets64 is backed by 
PaddedPODArray, whose left padding provides the row-0 sentinel at -1. The 
existing doc-snapshot offset check immediately below uses the same nrow - 1 
convention. I am keeping that established local pattern so this remains the 
minimal sparse-offset fix.



-- 
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