Commit 2a77e10
authored
feat(ipc): add with_skip_validation to StreamDecoder (#9749)
# Which issue does this PR close?
N/A - this is a small API parity fix.
# Rationale for this change
`StreamReader` and `FileDecoder` both expose `with_skip_validation` but
`StreamDecoder` does not, despite having the same internal
`skip_validation` field.
Motivation: DataFusion's spill infrastructure is being refactored to use
`StreamDecoder` for reading spill files via a pluggable backend trait
([apache/datafusion#21215](apache/datafusion#21215)).
Since DataFusion controls what it writes it can trust its own IPC
output, and needs this method to maintain the same performance
characteristic as the current StreamReader-based implementation
# What changes are included in this PR?
Adds `with_skip_validation` to `StreamDecoder` mirroring the existing
implementation on `FileDecoder`
# Are these changes tested?
The existing StreamDecoder tests cover the decoding path. No new tests
added as this method sets an internal flag already tested via
`FileDecoder` and `StreamReader`.
# Are there any user-facing changes?
Yes, `with_skip_validation` is now available on `StreamDecoder`. It is
marked unsafe with the same safety requirements as
`FileDecoder::with_skip_validation`.1 parent b93240a commit 2a77e10
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | | - | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
117 | 130 | | |
118 | 131 | | |
119 | 132 | | |
| |||
0 commit comments