Skip to content

Commit

Permalink
[CHORE] Fix monotonically_increasing_id physical op (#1853)
Browse files Browse the repository at this point in the history
#1827 was failing in CI, here's the fix
  • Loading branch information
colin-ho authored Feb 8, 2024
1 parent e53958b commit 1066ace
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::sync::Arc;
use crate::physical_plan::PhysicalPlan;
use serde::{Deserialize, Serialize};

#[derive(Clone, Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct MonotonicallyIncreasingId {
pub input: Arc<PhysicalPlan>,
pub column_name: String,
Expand All @@ -16,4 +16,8 @@ impl MonotonicallyIncreasingId {
column_name: column_name.to_owned(),
}
}

pub fn multiline_display(&self) -> Vec<String> {
vec!["MonotonicallyIncreasingId".to_string()]
}
}
5 changes: 5 additions & 0 deletions src/daft-plan/src/physical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ impl PhysicalPlan {
}) => vec![broadcaster, receiver],
Self::SortMergeJoin(SortMergeJoin { left, right, .. }) => vec![left, right],
Self::Concat(Concat { input, other }) => vec![input, other],
Self::MonotonicallyIncreasingId(MonotonicallyIncreasingId { input, .. }) => vec![input],
}
}

Expand Down Expand Up @@ -389,6 +390,7 @@ impl PhysicalPlan {
Self::TabularWriteParquet(..) => "TabularWriteParquet",
Self::TabularWriteCsv(..) => "TabularWriteCsv",
Self::TabularWriteJson(..) => "TabularWriteJson",
Self::MonotonicallyIncreasingId(..) => "MonotonicallyIncreasingId",
};
name.to_string()
}
Expand Down Expand Up @@ -427,6 +429,9 @@ impl PhysicalPlan {
}
Self::TabularWriteCsv(tabular_write_csv) => tabular_write_csv.multiline_display(),
Self::TabularWriteJson(tabular_write_json) => tabular_write_json.multiline_display(),
Self::MonotonicallyIncreasingId(monotonically_increasing_id) => {
monotonically_increasing_id.multiline_display()
}
}
}

Expand Down

0 comments on commit 1066ace

Please sign in to comment.