Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
avoid copy
  • Loading branch information
XiangpengHao committed Aug 9, 2024
commit 3b8d1a19dd66c3062aa0dd12cfba425e33195f02
16 changes: 6 additions & 10 deletions datafusion/core/src/datasource/physical_plan/arrow_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,7 @@ impl FileOpener for ArrowOpener {
for (dict_block, dict_result) in
footer.dictionaries().iter().flatten().zip(dict_results)
{
decoder.read_dictionary(
dict_block,
&Buffer::from_bytes(dict_result.into()),
)?;
decoder.read_dictionary(dict_block, &Buffer::from_bytes(dict_result.into()))?;
}

// filter recordbatches according to range
Expand Down Expand Up @@ -335,12 +332,11 @@ impl FileOpener for ArrowOpener {
.into_iter()
.zip(recordbatch_results)
.filter_map(move |(block, data)| {
decoder
.read_record_batch(
&block,
&Buffer::from_bytes(data.into()),
)
.transpose()
match decoder.read_record_batch(&block, &Buffer::from_bytes(data.into())) {
Ok(Some(record_batch)) => Some(Ok(record_batch)),
Ok(None) => None,
Err(err) => Some(Err(err)),
}
}),
)
.boxed())
Expand Down