Gabriel39 commented on PR #66556: URL: https://github.com/apache/doris/pull/66556#issuecomment-5301828675
[P1] Required-column empty value sections can still reach the original decoder and abort the BE. The new condition only selects `EmptyValueSectionDecoder` when `_page_data.empty() && _max_def_level > 0`. For a malformed compressed DataPageV2 with a required BOOLEAN/PLAIN column, `num_values > 0`, and an empty physical value section, `_max_def_level` is 0, so this condition is false. `_reserve_decompress_buf(0)` does not allocate a buffer, and the code proceeds to `BoolPlainDecoder::set_data()` with `Slice(nullptr, 0)`, which calls `BatchedBitReader::Reset()` and triggers the same `DCHECK(buffer != nullptr)` that this PR is intended to prevent. Parquet input is untrusted, so a malformed required page should return `Corruption` rather than terminate the BE. Please detect an empty physical value section independently of `_max_def_level` (or explicitly validate required pages before invoking the encoding-specific decoder), and add a compressed DataPageV2 test with a required BOOLEAN column, a nonzero value count, and no value bytes. The test should verify that decoding returns `Corruption` without aborting the process. -- 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]
