From 2ffabd410a67e3671152985551ff7e6ac04746b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 14:35:54 +0300 Subject: [PATCH] Bump polars from 1.9.0 to 1.10.0 (#1667) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump polars from 1.9.0 to 1.10.0 Bumps [polars](https://github.com/pola-rs/polars) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/pola-rs/polars/releases) - [Commits](https://github.com/pola-rs/polars/compare/py-1.9.0...py-1.10.0) --- updated-dependencies: - dependency-name: polars dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Fix polars column issue. --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Călina Cenan --- pdr_backend/lake_info/overview.py | 12 ++++++++++-- setup.py | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pdr_backend/lake_info/overview.py b/pdr_backend/lake_info/overview.py index 3ee7f2565..99d8eb4b4 100644 --- a/pdr_backend/lake_info/overview.py +++ b/pdr_backend/lake_info/overview.py @@ -274,9 +274,17 @@ def validate_lake_tables_no_duplicates(self) -> List[str]: query = query_duplicate_rows.replace("target_table", table_name) rows_df: pl.DataFrame = self.db.query_data(query) - duplicate_rows = duplicate_rows.vstack(rows_df) + duplicate_rows = ( + duplicate_rows.vstack(rows_df) + if duplicate_rows.shape[0] > 0 + else rows_df + ) - duplicate_summary = duplicate_summary.vstack(summary_df) + duplicate_summary = ( + duplicate_summary.vstack(summary_df) + if duplicate_summary.shape[0] > 0 + else summary_df + ) violations.append(f"Table {table_name} has duplicates.") if duplicate_summary.shape[0] == 0: diff --git a/setup.py b/setup.py index bebb921f6..02c5c1385 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ "pandas==2.2.3", "pathlib", "plotly==5.24.1", - "polars==1.9.0", + "polars==1.10.0", "polars[timezone]", "pyarrow==17.0.0", "pylint==3.3.1",