Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
samster25 committed Nov 13, 2023
1 parent e35267b commit 304f686
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/daft-micropartition/src/ops/agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::micropartition::MicroPartition;

impl MicroPartition {
pub fn agg(&self, to_agg: &[Expr], group_by: &[Expr]) -> DaftResult<Self> {
let io_stats = IOStatsContext::new(format!("MicroPartition::agg"));
let io_stats = IOStatsContext::new("MicroPartition::agg".to_string());

let tables = self.concat_or_get(io_stats)?;

Expand Down
2 changes: 1 addition & 1 deletion src/daft-micropartition/src/ops/concat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl MicroPartition {
}
}

let io_stats = IOStatsContext::new(format!("MicroPartition::concat"));
let io_stats = IOStatsContext::new("MicroPartition::concat".to_string());

let mut all_tables = vec![];

Expand Down
4 changes: 2 additions & 2 deletions src/daft-micropartition/src/ops/eval_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn infer_schema(exprs: &[Expr], schema: &Schema) -> DaftResult<Schema> {

impl MicroPartition {
pub fn eval_expression_list(&self, exprs: &[Expr]) -> DaftResult<Self> {
let io_stats = IOStatsContext::new(format!("MicroPartition::eval_expression_list"));
let io_stats = IOStatsContext::new("MicroPartition::eval_expression_list".to_string());

let expected_schema = infer_schema(exprs, &self.schema)?;
let tables = self.tables_or_read(io_stats)?;
Expand All @@ -54,7 +54,7 @@ impl MicroPartition {
}

pub fn explode(&self, exprs: &[Expr]) -> DaftResult<Self> {
let io_stats = IOStatsContext::new(format!("MicroPartition::explode"));
let io_stats = IOStatsContext::new("MicroPartition::explode".to_string());

let tables = self.tables_or_read(io_stats)?;
let evaluated_tables = tables
Expand Down
2 changes: 1 addition & 1 deletion src/daft-micropartition/src/ops/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use daft_stats::TruthValue;

impl MicroPartition {
pub fn filter(&self, predicate: &[Expr]) -> DaftResult<Self> {
let io_stats = IOStatsContext::new(format!("MicroPartition::filter"));
let io_stats = IOStatsContext::new("MicroPartition::filter".to_string());
if predicate.is_empty() {
return Ok(Self::empty(Some(self.schema.clone())));
}
Expand Down
2 changes: 1 addition & 1 deletion src/daft-micropartition/src/ops/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl MicroPartition {
if let TruthValue::False = tv {
return Ok(Self::empty(Some(join_schema.into())));
}
let io_stats = IOStatsContext::new(format!("MicroPartition::join"));
let io_stats = IOStatsContext::new("MicroPartition::join".to_string());

let lt = self.concat_or_get(io_stats.clone())?;
let rt = right.concat_or_get(io_stats)?;
Expand Down
6 changes: 3 additions & 3 deletions src/daft-micropartition/src/ops/partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl MicroPartition {
exprs: &[Expr],
num_partitions: usize,
) -> DaftResult<Vec<Self>> {
let io_stats = IOStatsContext::new(format!("MicroPartition::partition_by_hash"));
let io_stats = IOStatsContext::new("MicroPartition::partition_by_hash".to_string());

let tables = self.tables_or_read(io_stats)?;

Expand All @@ -66,7 +66,7 @@ impl MicroPartition {
}

pub fn partition_by_random(&self, num_partitions: usize, seed: u64) -> DaftResult<Vec<Self>> {
let io_stats = IOStatsContext::new(format!("MicroPartition::partition_by_random"));
let io_stats = IOStatsContext::new("MicroPartition::partition_by_random".to_string());

let tables = self.tables_or_read(io_stats)?;

Expand All @@ -92,7 +92,7 @@ impl MicroPartition {
boundaries: &Table,
descending: &[bool],
) -> DaftResult<Vec<Self>> {
let io_stats = IOStatsContext::new(format!("MicroPartition::partition_by_range"));
let io_stats = IOStatsContext::new("MicroPartition::partition_by_range".to_string());

let tables = self.tables_or_read(io_stats)?;

Expand Down
4 changes: 2 additions & 2 deletions src/daft-micropartition/src/ops/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::micropartition::MicroPartition;

impl MicroPartition {
pub fn sort(&self, sort_keys: &[Expr], descending: &[bool]) -> DaftResult<Self> {
let io_stats = IOStatsContext::new(format!("MicroPartition::sort"));
let io_stats = IOStatsContext::new("MicroPartition::sort".to_string());

let tables = self.concat_or_get(io_stats)?;
match tables.as_slice() {
Expand All @@ -28,7 +28,7 @@ impl MicroPartition {
}

pub fn argsort(&self, sort_keys: &[Expr], descending: &[bool]) -> DaftResult<Series> {
let io_stats = IOStatsContext::new(format!("MicroPartition::argsort"));
let io_stats = IOStatsContext::new("MicroPartition::argsort".to_string());

let tables = self.concat_or_get(io_stats)?;
match tables.as_slice() {
Expand Down
2 changes: 1 addition & 1 deletion src/daft-micropartition/src/ops/take.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::micropartition::MicroPartition;

impl MicroPartition {
pub fn take(&self, idx: &Series) -> DaftResult<Self> {
let io_stats = IOStatsContext::new(format!("MicroPartition::take"));
let io_stats = IOStatsContext::new("MicroPartition::take".to_string());

let tables = self.concat_or_get(io_stats)?;
match tables.as_slice() {
Expand Down

0 comments on commit 304f686

Please sign in to comment.