Skip to content

Commit 6379cf1

Browse files
committed
WIP: Address minor warnings
1 parent 8b4b329 commit 6379cf1

File tree

3 files changed

+3
-42
lines changed

3 files changed

+3
-42
lines changed

rust/cubestore/cubestore/src/queryplanner/topk/execute.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl AggregateTopKExec {
138138
}
139139

140140
impl DisplayAs for AggregateTopKExec {
141-
fn fmt_as(&self, t: DisplayFormatType, f: &mut fmt::Formatter) -> fmt::Result {
141+
fn fmt_as(&self, _t: DisplayFormatType, f: &mut fmt::Formatter) -> fmt::Result {
142142
write!(f, "AggregateTopKExec")
143143
}
144144
}
@@ -962,7 +962,7 @@ fn write_group_result_row(
962962
mode: AggregateMode,
963963
group_by_values: &[GroupByScalar],
964964
accumulator_set: &mut AccumulatorSet,
965-
key_fields: &[Arc<Field>],
965+
_key_fields: &[Arc<Field>],
966966
key_columns: &mut Vec<Box<dyn ArrayBuilder>>,
967967
value_columns: &mut Vec<Box<dyn ArrayBuilder>>,
968968
) -> Result<(), DataFusionError> {

rust/cubestore/cubestore/src/queryplanner/topk/mod.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use datafusion::logical_expr::{Expr, Extension, LogicalPlan, UserDefinedLogicalN
1717
use itertools::Itertools;
1818
use serde_derive::{Deserialize, Serialize};
1919
use std::any::Any;
20-
use std::cmp::Ordering;
2120
use std::fmt::{Display, Formatter};
2221
use std::hash::Hash;
2322
use std::hash::Hasher;
@@ -148,14 +147,6 @@ impl Display for SortColumn {
148147
}
149148
}
150149

151-
impl ClusterAggregateTopK {
152-
pub fn into_plan(self) -> LogicalPlan {
153-
LogicalPlan::Extension(Extension {
154-
node: Arc::new(self),
155-
})
156-
}
157-
}
158-
159150
impl UserDefinedLogicalNode for ClusterAggregateTopK {
160151
fn as_any(&self) -> &dyn Any {
161152
self

rust/cubestore/cubestore/src/queryplanner/topk/plan.rs

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ fn extract_projections_and_havings(
355355
for (i, e) in expr.iter().enumerate() {
356356
let new_e = e.clone().transform_up(|node| {
357357
node.unalias_nested().transform_data(|node| match node {
358-
Expr::Column(c) => {
358+
Expr::Column(_) => {
359359
let replacement: Expr =
360360
inner_column_projection.post_projection[input_columns[i]].clone();
361361
// Transformed::yes/no doesn't matter here.
@@ -649,33 +649,3 @@ pub fn make_sort_expr(
649649
_ => col,
650650
}
651651
}
652-
653-
// TODO upgrade DF: Remove (or dedup with pp_plan code)
654-
fn pp_topk_line(topk: &ClusterAggregateTopK) -> String {
655-
let mut output = String::new();
656-
output += &format!("ClusterAggregateTopK, limit: {}", topk.limit);
657-
if true
658-
/* self.opts.show_aggregations */
659-
{
660-
output += &format!(", aggs: {:?}", topk.aggregate_expr)
661-
}
662-
if true
663-
/* self.opts.show_sort_by */
664-
{
665-
output += &format!(
666-
", sortBy: {}",
667-
crate::queryplanner::pretty_printers::pp_sort_columns(
668-
topk.group_expr.len(),
669-
&topk.order_by
670-
)
671-
);
672-
}
673-
if true
674-
/* self.opts.show_filters */
675-
{
676-
if let Some(having) = &topk.having_expr {
677-
output += &format!(", having: {:?}", having)
678-
}
679-
}
680-
output
681-
}

0 commit comments

Comments
 (0)