Commit aba31ae
committed
[fix](parquet) Handle empty value sections
### What problem does this PR solve?
Issue Number: close #66430
Related PR: None
Problem Summary:
A compressed Parquet DataPageV2 can legally contain definition levels
but no physical values when every nullable value is NULL. The legacy
reader passed the resulting null, zero-length slice to the BOOLEAN
PLAIN decoder and aborted the BE in BatchedBitReader::Reset().
Use a dedicated empty-value-section decoder for these pages. Accept the
page when definition levels require no physical values, and return
Corruption when values are required but absent. Update page progress
only after decoding succeeds so failures leave reader state unchanged.
### Release note
Fix a BE crash when reading Parquet pages with empty value sections.
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [x] Unit Test
- ./run-be-ut.sh --run --filter=ParquetColumnChunkReaderTest.* -j 2
- All 11 tests passed with ASAN.
- [x] Manual test (add detailed scripts or steps below)
- ./build.sh --be -j 2
- BE build succeeded.
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [x] Yes. Valid all-NULL Parquet pages are accepted. Pages whose
definition levels require missing physical values return
Corruption instead of aborting the BE.
- Does this need documentation?
- [x] No.
- [ ] Yes. <!-- Add document PR link here. eg: apache/doris-website#1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->1 parent 30a699a commit aba31ae
3 files changed
Lines changed: 156 additions & 8 deletions
File tree
- be
- src/format/parquet
- test/format/parquet
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
46 | 75 | | |
47 | 76 | | |
48 | 77 | | |
| |||
358 | 387 | | |
359 | 388 | | |
360 | 389 | | |
| 390 | + | |
361 | 391 | | |
362 | | - | |
| 392 | + | |
363 | 393 | | |
364 | 394 | | |
365 | 395 | | |
366 | 396 | | |
367 | 397 | | |
368 | 398 | | |
369 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
370 | 412 | | |
371 | | - | |
372 | 413 | | |
373 | 414 | | |
374 | 415 | | |
| |||
546 | 587 | | |
547 | 588 | | |
548 | 589 | | |
549 | | - | |
550 | 590 | | |
551 | 591 | | |
552 | | - | |
553 | | - | |
554 | | - | |
| 592 | + | |
555 | 593 | | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
556 | 597 | | |
557 | 598 | | |
558 | 599 | | |
| |||
569 | 610 | | |
570 | 611 | | |
571 | 612 | | |
| 613 | + | |
| 614 | + | |
572 | 615 | | |
573 | | - | |
| 616 | + | |
574 | 617 | | |
575 | 618 | | |
576 | 619 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
280 | 281 | | |
| 282 | + | |
281 | 283 | | |
282 | 284 | | |
283 | 285 | | |
| |||
Lines changed: 103 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| 38 | + | |
36 | 39 | | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
251 | 255 | | |
252 | 256 | | |
253 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
254 | 304 | | |
255 | 305 | | |
256 | 306 | | |
| |||
386 | 436 | | |
387 | 437 | | |
388 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
389 | 492 | | |
390 | 493 | | |
391 | 494 | | |
| |||
0 commit comments