Repository navigation
Commit 5ede4b6
authored
[fix](paimon) Correct pruned struct field reads (apache#66223)
## Proposed changes
- Preserve the full Paimon `RowType` arity when reading projected struct
fields.
- Add unit coverage for non-leading, non-contiguous, and complete struct
projections backed by a binary row.
## Problem summary
Struct projection entries use original child indexes, but the scanner
initialized the nested binary row with the number of projected fields. A
projection such as the third child therefore created a one-field row and
then accessed index two, producing incorrect reads or an out-of-bounds
failure.
## Regression coverage
- `testUnpackNonLeadingStructField` constructs a three-field binary row
and projects only original field index 2. The previous implementation
fails with `index (2) should < 1`.
- `testUnpackNonContiguousStructFields` projects original field indexes
0 and 2. The previous implementation fails with `index (2) should < 2`.
- `testUnpackCompleteStruct` protects the existing full-struct behavior.
- With this fix restored, all three tests pass with Maven build caching
disabled.
## Validation
- Reverted the row-arity fix locally and confirmed that the two
pruned-field regression tests fail.
- Restored the fix and reran the same test class: 3 tests, 0 failures, 0
errors.
- Ran all Paimon scanner test classes with Maven build caching disabled:
15 tests, 0 failures, 0 errors.
- Checkstyle passed for the affected reactor modules.1 parent efb70b3 commit 5ede4b6
2 files changed
Lines changed: 93 additions & 3 deletions
File tree
- fe/be-java-extensions/paimon-scanner/src
- main/java/org/apache/doris/paimon
- test/java/org/apache/doris/paimon
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
202 | 203 | | |
203 | 204 | | |
204 | | - | |
| 205 | + | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 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 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
0 commit comments