Commit beff689
committed
Reject non-12-byte inputs in BINARY_AS_INT96_TIMESTAMP_COMPARATOR
Without the guard, a malformed Binary throws IndexOutOfBoundsException
from inside the stats-pruning path (for length < 12) or silently
mis-compares by reading only the first 12 bytes (for length > 12).
Throw IllegalArgumentException with a clear message instead, matching
the precedent set by Binary.get2BytesLittleEndian for FLOAT16.1 parent dc2197f commit beff689
2 files changed
Lines changed: 25 additions & 0 deletions
File tree
- parquet-column/src
- main/java/org/apache/parquet/schema
- test/java/org/apache/parquet/schema
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
218 | 222 | | |
219 | 223 | | |
220 | 224 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
358 | 379 | | |
359 | 380 | | |
360 | 381 | | |
| |||
0 commit comments