From e461ffca6953f0f47a0b5e063a5d37d62a8c8e2a Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Fri, 17 Nov 2023 14:05:51 -0500 Subject: [PATCH] feat: In explain(), rename PIPELINE to STREAMING so it's clearer what it means (#12547) Co-authored-by: Itamar Turner-Trauring --- crates/polars-plan/src/logical_plan/functions/mod.rs | 6 +++--- py-polars/tests/unit/streaming/test_streaming.py | 2 +- py-polars/tests/unit/streaming/test_streaming_cse.py | 2 +- py-polars/tests/unit/streaming/test_streaming_group_by.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/polars-plan/src/logical_plan/functions/mod.rs b/crates/polars-plan/src/logical_plan/functions/mod.rs index 72efcf252c39..7517d2a1f627 100644 --- a/crates/polars-plan/src/logical_plan/functions/mod.rs +++ b/crates/polars-plan/src/logical_plan/functions/mod.rs @@ -385,12 +385,12 @@ impl Display for FunctionNode { MergeSorted { .. } => write!(f, "MERGE SORTED"), Pipeline { original, .. } => { if let Some(original) = original { - writeln!(f, "--- PIPELINE")?; + writeln!(f, "--- STREAMING")?; write!(f, "{:?}", original.as_ref())?; let indent = 2; - writeln!(f, "{:indent$}--- END PIPELINE", "") + writeln!(f, "{:indent$}--- END STREAMING", "") } else { - writeln!(f, "PIPELINE") + writeln!(f, "STREAMING") } }, Rename { .. } => write!(f, "RENAME"), diff --git a/py-polars/tests/unit/streaming/test_streaming.py b/py-polars/tests/unit/streaming/test_streaming.py index aafc20798cfe..d88dff3e53f1 100644 --- a/py-polars/tests/unit/streaming/test_streaming.py +++ b/py-polars/tests/unit/streaming/test_streaming.py @@ -176,7 +176,7 @@ def test_streaming_ternary() -> None: pl.when(pl.col("a") >= 2).then(pl.col("a")).otherwise(None).alias("b"), ) .explain(streaming=True) - .startswith("--- PIPELINE") + .startswith("--- STREAMING") ) diff --git a/py-polars/tests/unit/streaming/test_streaming_cse.py b/py-polars/tests/unit/streaming/test_streaming_cse.py index 693a619a4817..909bbc272f3a 100644 --- a/py-polars/tests/unit/streaming/test_streaming_cse.py +++ b/py-polars/tests/unit/streaming/test_streaming_cse.py @@ -79,7 +79,7 @@ def test_cse_expr_group_by() -> None: # check if it uses CSE_expr # and is a complete pipeline assert "__POLARS_CSER" in s - assert s.startswith("--- PIPELINE") + assert s.startswith("--- STREAMING") expected = pl.DataFrame( {"a": [1, 2, 3, 4], "sum": [1, 4, 9, 16], "min": [1, 4, 9, 16]} diff --git a/py-polars/tests/unit/streaming/test_streaming_group_by.py b/py-polars/tests/unit/streaming/test_streaming_group_by.py index 183782373d90..66078051db2e 100644 --- a/py-polars/tests/unit/streaming/test_streaming_group_by.py +++ b/py-polars/tests/unit/streaming/test_streaming_group_by.py @@ -392,7 +392,7 @@ def test_streaming_restart_non_streamable_group_by() -> None: ) # non-streamable UDF + nested_agg ) - assert """--- PIPELINE""" in res.explain(streaming=True) + assert """--- STREAMING""" in res.explain(streaming=True) def test_group_by_min_max_string_type() -> None: