Commit 0e8b821
committed
GH-3495: Deprecate LittleEndianDataOutputStream and remove remaining wrapper usages
This is an API cleanup commit with no measurable performance impact;
it removes the last two production usages of LittleEndianDataOutputStream
so the class can be deprecated.
After the previous commit removed LittleEndianDataOutputStream from
PlainValuesWriter, two production usages remained:
- FixedLenByteArrayPlainValuesWriter wrapped its CapacityByteArrayOutputStream
in a LittleEndianDataOutputStream solely to call Binary.writeTo(out) for the
fixed-length payload. The fixed-length encoding has no length prefix and the
wrapper exposed no LE-specific behavior used here -- Binary.writeTo() only
invokes OutputStream.write(byte[], int, int), which the wrapper passes
through unchanged. The wrapper has been removed and the writer now writes
the binary payload directly to the underlying CapacityByteArrayOutputStream.
The wrapper-specific flush() in getBytes() is also gone (CBOS does not
buffer).
- DeltaLengthByteArrayValuesWriter had the same pattern: a wrapper used only
for v.writeTo(out) on the concatenated byte-array payload, with lengths
written through a separate DeltaBinaryPackingValuesWriterForInteger. The
wrapper has been removed for the same reasons.
With no remaining production usages, LittleEndianDataOutputStream is marked
@deprecated. The class is retained for binary compatibility (it is part of
the public parquet-common API) and will be removed in a future major release.
The javadoc directs producers of PLAIN-encoded data to write little-endian
values directly into a ByteBuffer with ByteOrder.LITTLE_ENDIAN, which
compiles to a single intrinsic store on little-endian architectures and
avoids the per-call byte decomposition and virtual dispatch performed by
this class.1 parent 39fc18c commit 0e8b821
3 files changed
Lines changed: 13 additions & 19 deletions
File tree
- parquet-column/src/main/java/org/apache/parquet/column/values
- deltalengthbytearray
- plain
- parquet-common/src/main/java/org/apache/parquet/bytes
Lines changed: 1 addition & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | | - | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
53 | | - | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
| |||
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
66 | | - | |
| 63 | + | |
67 | 64 | | |
68 | 65 | | |
69 | 66 | | |
| |||
76 | 73 | | |
77 | 74 | | |
78 | 75 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 76 | | |
85 | 77 | | |
86 | 78 | | |
| |||
Lines changed: 1 addition & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
| |||
56 | 53 | | |
57 | 54 | | |
58 | 55 | | |
59 | | - | |
| 56 | + | |
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
| |||
69 | 66 | | |
70 | 67 | | |
71 | 68 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | 69 | | |
78 | 70 | | |
79 | 71 | | |
| |||
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
28 | 37 | | |
| 38 | + | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
| |||
0 commit comments