Skip to content

Commit

Permalink
MINOR: remove one duplicated inparam in TopK (apache#13479)
Browse files Browse the repository at this point in the history
Signed-off-by: Ruihang Xia <[email protected]>
  • Loading branch information
waynexia authored Nov 19, 2024
1 parent f302383 commit c44b613
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion datafusion/physical-plan/src/sorts/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,6 @@ impl ExecutionPlan for SortExec {
context.session_config().batch_size(),
context.runtime_env(),
&self.metrics_set,
partition,
)?;
Ok(Box::pin(RecordBatchStreamAdapter::new(
self.schema(),
Expand Down
7 changes: 2 additions & 5 deletions datafusion/physical-plan/src/topk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ pub struct TopK {
impl TopK {
/// Create a new [`TopK`] that stores the top `k` values, as
/// defined by the sort expressions in `expr`.
// TODO: make a builder or some other nicer API to avoid the
// clippy warning
#[allow(clippy::too_many_arguments)]
// TODO: make a builder or some other nicer API
pub fn try_new(
partition_id: usize,
schema: SchemaRef,
Expand All @@ -106,7 +104,6 @@ impl TopK {
batch_size: usize,
runtime: Arc<RuntimeEnv>,
metrics: &ExecutionPlanMetricsSet,
partition: usize,
) -> Result<Self> {
let reservation = MemoryConsumer::new(format!("TopK[{partition_id}]"))
.register(&runtime.memory_pool);
Expand All @@ -133,7 +130,7 @@ impl TopK {

Ok(Self {
schema: Arc::clone(&schema),
metrics: TopKMetrics::new(metrics, partition),
metrics: TopKMetrics::new(metrics, partition_id),
reservation,
batch_size,
expr,
Expand Down

0 comments on commit c44b613

Please sign in to comment.