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


##########
be/test/format/parquet/parquet_thrift_test.cpp:
##########
@@ -457,4 +458,34 @@ TEST_F(ParquetThriftReaderTest, dict_decoder) {
     
read_parquet_data_and_check("./be/test/exec/test_data/parquet_scanner/dict-decoder.parquet",
                                 
"./be/test/exec/test_data/parquet_scanner/dict-decoder.txt", 12);
 }
+
+TEST_F(ParquetThriftReaderTest, 
is_dictionary_encoded_rejects_plain_data_page_v2) {
+    tparquet::ColumnMetaData column_metadata;
+    column_metadata.type = tparquet::Type::BYTE_ARRAY;
+    column_metadata.__isset.encoding_stats = true;
+
+    tparquet::PageEncodingStats dict_page;
+    dict_page.page_type = tparquet::PageType::DATA_PAGE_V2;
+    dict_page.encoding = tparquet::Encoding::RLE_DICTIONARY;
+    dict_page.count = 2;
+
+    tparquet::PageEncodingStats plain_page;
+    plain_page.page_type = tparquet::PageType::DATA_PAGE_V2;
+    plain_page.encoding = tparquet::Encoding::PLAIN;
+    plain_page.count = 1;
+
+    column_metadata.encoding_stats = {dict_page, plain_page};
+
+    tparquet::RowGroup row_group;
+    row_group.num_rows = 0;
+    RowGroupReader::PositionDeleteContext 
position_delete_ctx(row_group.num_rows, 0);
+    RowGroupReader::LazyReadContext lazy_read_ctx;
+    std::set<uint64_t> column_ids;
+    std::set<uint64_t> filter_column_ids;
+    RowGroupReader row_group_reader(nullptr, {}, 0, row_group, nullptr, 
nullptr,
+                                    position_delete_ctx, lazy_read_ctx, 
nullptr, column_ids,
+                                    filter_column_ids);
+
+    EXPECT_FALSE(row_group_reader.is_dictionary_encoded(column_metadata));

Review Comment:
   This test will not compile as written: 
`RowGroupReader::is_dictionary_encoded` is declared in the private section of 
`vparquet_group_reader.h`, and this test file does not use a friend/test helper 
or a `private` visibility override. Because the new BE UT directly calls 
`row_group_reader.is_dictionary_encoded(...)`, the target fails at compile time 
instead of validating the DATA_PAGE_V2 fix. Please expose this logic through a 
testable helper (or test through the public reader path) before adding the 
assertion.



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