Skip to content

Commit

Permalink
fix: Read arguably malformed Parquet files from go
Browse files Browse the repository at this point in the history
This ports a change made upstream in apache/arrow-rs#7052
  • Loading branch information
coastalwhite committed Feb 6, 2025
1 parent 185ee3b commit e023d14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/thrift/protocol/compact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ where
let b = self.read_byte()?;
match b {
0x01 => Ok(true),
0x02 => Ok(false),
0x00 | 0x02 => Ok(false),
unkn => Err(Error::Protocol(ProtocolError {
kind: ProtocolErrorKind::InvalidData,
message: format!("cannot convert {} into bool", unkn),
Expand Down
2 changes: 1 addition & 1 deletion src/thrift/protocol/compact_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl<R: VarIntAsyncReader + AsyncRead + Unpin + Send> TInputStreamProtocol
let b = self.read_byte().await?;
match b {
0x01 => Ok(true),
0x02 => Ok(false),
0x00 | 0x02 => Ok(false),
unkn => Err(Error::Protocol(ProtocolError {
kind: ProtocolErrorKind::InvalidData,
message: format!("cannot convert {} into bool", unkn),
Expand Down

0 comments on commit e023d14

Please sign in to comment.