github-actions[bot] commented on code in PR #66261:
URL: https://github.com/apache/doris/pull/66261#discussion_r3680365325


##########
be/test/format_v2/parquet/parquet_reader_control_test.cpp:
##########
@@ -179,11 +180,45 @@ TEST(SelectionVectorTest, 
MaterializedFilterIsReusedUntilSelectionChanges) {
 
 TEST(SelectionVectorTest, IdentitySelectionDoesNotMaterializeFilter) {
     SelectionVector selection(4);
+    EXPECT_FALSE(selection.is_set());
     const uint8_t* filter = reinterpret_cast<const uint8_t*>(1);
     ASSERT_TRUE(selection.materialize_filter(4, 4, &filter).ok());
     EXPECT_EQ(filter, nullptr);
 }
 
+TEST(SelectionVectorTest, BulkCompactionSupportsBothFilterCoordinates) {
+    SelectionVector selection(6);
+    const uint8_t row_filter[] = {0, 1, 1, 0, 1, 0};
+    ASSERT_EQ(selection.compact_with_row_filter(row_filter, 6), 3);
+    EXPECT_EQ(selection.get_index(0), 1);
+    EXPECT_EQ(selection.get_index(1), 2);
+    EXPECT_EQ(selection.get_index(2), 4);
+
+    const uint8_t compact_filter[] = {1, 0, 1};
+    ASSERT_EQ(selection.compact_with_selection_filter(compact_filter, 3), 2);
+    EXPECT_EQ(selection.get_index(0), 1);
+    EXPECT_EQ(selection.get_index(1), 4);
+    EXPECT_TRUE(selection.verify(2, 6).ok());
+}
+
+TEST(QueryDictionaryFilterCacheTest, ReusesBitmapWithinMemoryLimit) {

Review Comment:
   [P2] Exercise this cache through the production scheduler
   
   This only verifies the standalone map with a fabricated key. The other cache 
assertions initialize `ParquetReader` before installing the mock 
`QueryContext`, so `set_runtime_state()` captures a null cache pointer and the 
zero counters do not exercise the TopN bypass. There is therefore no test of 
the production key or bitmap reuse. Please add a scan with a live 
`QueryContext` installed before initialization that observes miss → hit for 
repeated dictionaries, compares cached and uncached rows, forces misses for 
changed predicates/dictionaries, and verifies TopN bypass with a non-null cache.



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