Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions datafusion/src/physical_plan/expressions/average.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ use super::{format_state_name, sum};
#[derive(Debug)]
pub struct Avg {
name: String,
#[allow(dead_code)]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I will look into removing this field as well

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR might be the reason causes the different behavior on dead_code.
rust-lang/rust#85200

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you are right

data_type: DataType,
nullable: bool,
expr: Arc<dyn PhysicalExpr>,
}

Expand Down Expand Up @@ -73,7 +73,6 @@ impl Avg {
name: name.into(),
expr,
data_type,
nullable: true,
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions datafusion/src/physical_plan/sort_preserving_merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ struct SortPreservingMergeStream {
receivers: Vec<mpsc::Receiver<ArrowResult<RecordBatch>>>,

/// Drop helper for tasks feeding the [`receivers`](Self::receivers)
drop_helper: AbortOnDropMany<()>,
_drop_helper: AbortOnDropMany<()>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is used (its drop() impl is used) so change its name


/// For each input stream maintain a dequeue of SortKeyCursor
///
Expand Down Expand Up @@ -379,7 +379,7 @@ struct SortPreservingMergeStream {
impl SortPreservingMergeStream {
fn new(
receivers: Vec<mpsc::Receiver<ArrowResult<RecordBatch>>>,
drop_helper: AbortOnDropMany<()>,
_drop_helper: AbortOnDropMany<()>,
schema: SchemaRef,
expressions: &[PhysicalSortExpr],
target_batch_size: usize,
Expand All @@ -394,7 +394,7 @@ impl SortPreservingMergeStream {
schema,
cursors,
receivers,
drop_helper,
_drop_helper,
column_expressions: expressions.iter().map(|x| x.expr.clone()).collect(),
sort_options: expressions.iter().map(|x| x.options).collect(),
target_batch_size,
Expand Down
5 changes: 1 addition & 4 deletions datafusion/src/physical_plan/string_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ where
let string_array = downcast_string_arg!(args[0], "string", T);

// first map is the iterator, second is for the `Option<_>`
Ok(string_array
.iter()
.map(|string| string.map(|s| op(s)))
.collect())
Ok(string_array.iter().map(|string| string.map(&op)).collect())
}

fn handle<'a, F, R>(args: &'a [ColumnarValue], op: F, name: &str) -> Result<ColumnarValue>
Expand Down
4 changes: 2 additions & 2 deletions datafusion/src/test/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ impl ExecutionPlan for BlockingExec {
async fn execute(&self, _partition: usize) -> Result<SendableRecordBatchStream> {
Ok(Box::pin(BlockingStream {
schema: Arc::clone(&self.schema),
refs: Arc::clone(&self.refs),
_refs: Arc::clone(&self.refs),
}))
}

Expand Down Expand Up @@ -577,7 +577,7 @@ pub struct BlockingStream {
schema: SchemaRef,

/// Ref-counting helper to check if the stream are still in memory.
refs: Arc<()>,
_refs: Arc<()>,
}

impl Stream for BlockingStream {
Expand Down