From 1066ace9a569a76063f4387f5939cec8a035a6ac Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 8 Feb 2024 12:33:46 +0800 Subject: [PATCH] [CHORE] Fix monotonically_increasing_id physical op (#1853) #1827 was failing in CI, here's the fix --- .../src/physical_ops/monotonically_increasing_id.rs | 6 +++++- src/daft-plan/src/physical_plan.rs | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/daft-plan/src/physical_ops/monotonically_increasing_id.rs b/src/daft-plan/src/physical_ops/monotonically_increasing_id.rs index 4bf63de0ce..a9384a3b28 100644 --- a/src/daft-plan/src/physical_ops/monotonically_increasing_id.rs +++ b/src/daft-plan/src/physical_ops/monotonically_increasing_id.rs @@ -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, pub column_name: String, @@ -16,4 +16,8 @@ impl MonotonicallyIncreasingId { column_name: column_name.to_owned(), } } + + pub fn multiline_display(&self) -> Vec { + vec!["MonotonicallyIncreasingId".to_string()] + } } diff --git a/src/daft-plan/src/physical_plan.rs b/src/daft-plan/src/physical_plan.rs index 031ce25be5..fdad24498c 100644 --- a/src/daft-plan/src/physical_plan.rs +++ b/src/daft-plan/src/physical_plan.rs @@ -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], } } @@ -389,6 +390,7 @@ impl PhysicalPlan { Self::TabularWriteParquet(..) => "TabularWriteParquet", Self::TabularWriteCsv(..) => "TabularWriteCsv", Self::TabularWriteJson(..) => "TabularWriteJson", + Self::MonotonicallyIncreasingId(..) => "MonotonicallyIncreasingId", }; name.to_string() } @@ -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() + } } }