Skip to content
Merged
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
Prev Previous commit
Next Next commit
fmt
  • Loading branch information
XiangpengHao committed Aug 6, 2024
commit 64eff784d3ccb6a416b55bcbb55a0d9487dd3e52
10 changes: 8 additions & 2 deletions datafusion/core/src/datasource/physical_plan/arrow_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,10 @@ 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()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 this was doing an implicit copy before

)?;
}

// filter recordbatches according to range
Expand Down Expand Up @@ -332,7 +335,10 @@ impl FileOpener for ArrowOpener {
.into_iter()
.zip(recordbatch_results)
.filter_map(move |(block, data)| {
match decoder.read_record_batch(&block, &Buffer::from_bytes(data.into())) {
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)),
Expand Down