Skip to content

Commit

Permalink
Bump polars version to <1.24 (#18076)
Browse files Browse the repository at this point in the history
The PR upgrades the Polars version to 1.23.

Authors:
  - Matthew Murray (https://github.com/Matt711)
  - GALI PREM SAGAR (https://github.com/galipremsagar)
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Matthew Roeschke (https://github.com/mroeschke)
  - Bradley Dice (https://github.com/bdice)

URL: #18076
  • Loading branch information
Matt711 authored Feb 27, 2025
1 parent 10048b8 commit b8ec71a
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 10 deletions.
2 changes: 2 additions & 0 deletions ci/test_cudf_polars_polars_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ git clone https://github.com/pola-rs/polars.git --branch "${TAG}" --depth 1

# Install requirements for running polars tests
rapids-logger "Install polars test requirements"
# TODO: Remove sed command when polars-cloud supports 1.23
sed -i '/^polars-cloud$/d' polars/py-polars/requirements-dev.txt
rapids-pip-retry install -r polars/py-polars/requirements-dev.txt -r polars/py-polars/requirements-ci.txt

# shellcheck disable=SC2317
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ dependencies:
- pandas
- pandas>=2.0,<2.2.4dev0
- pandoc
- polars>=1.20,<1.23
- polars>=1.20,<1.24
- pre-commit
- ptxcompiler
- pyarrow>=14.0.0,<20.0.0a0
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-128_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ dependencies:
- pandas
- pandas>=2.0,<2.2.4dev0
- pandoc
- polars>=1.20,<1.23
- polars>=1.20,<1.24
- pre-commit
- pyarrow>=14.0.0,<20.0.0a0
- pydata-sphinx-theme>=0.15.4
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/cudf-polars/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ requirements:
run:
- python
- pylibcudf ={{ version }}
- polars >=1.20,<1.23
- polars >=1.20,<1.24
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}

test:
Expand Down
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ dependencies:
common:
- output_types: [conda, requirements, pyproject]
packages:
- polars>=1.20,<1.23
- polars>=1.20,<1.24
run_cudf_polars_experimental:
common:
- output_types: [conda, requirements, pyproject]
Expand Down
1 change: 0 additions & 1 deletion python/cudf_polars/cudf_polars/testing/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ def pytest_configure(config: pytest.Config) -> None:
"tests/unit/io/test_multiscan.py::test_include_file_paths[scan_csv-write_csv]": "Need to expose include_file_paths xref: cudf#18012",
"tests/unit/streaming/test_streaming_io.py::test_parquet_eq_statistics[False]": "Debug output on stderr doesn't match",
# Maybe flaky, order-dependent?
"tests/unit/test_projections.py::test_schema_full_outer_join_projection_pd_13287": "Order-specific result check, query is correct but in different order",
"tests/unit/test_queries.py::test_group_by_agg_equals_zero_3535": "libcudf sums all nulls to null, not zero",
}

Expand Down
18 changes: 14 additions & 4 deletions python/cudf_polars/cudf_polars/utils/dtypes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES.
# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES.
# SPDX-License-Identifier: Apache-2.0

"""Datatype utilities."""
Expand Down Expand Up @@ -71,7 +71,9 @@ def can_cast(from_: plc.DataType, to: plc.DataType) -> bool:
-------
True if casting is supported, False otherwise
"""
has_empty = from_.id() == plc.TypeId.EMPTY or to.id() == plc.TypeId.EMPTY
to_is_empty = to.id() == plc.TypeId.EMPTY
from_is_empty = from_.id() == plc.TypeId.EMPTY
has_empty = to_is_empty or from_is_empty
return (
(
from_ == to
Expand All @@ -84,8 +86,16 @@ def can_cast(from_: plc.DataType, to: plc.DataType) -> bool:
)
)
)
or (from_.id() == plc.TypeId.STRING and is_numeric_not_bool(to))
or (to.id() == plc.TypeId.STRING and is_numeric_not_bool(from_))
or (
from_.id() == plc.TypeId.STRING
and not to_is_empty
and is_numeric_not_bool(to)
)
or (
to.id() == plc.TypeId.STRING
and not from_is_empty
and is_numeric_not_bool(from_)
)
)


Expand Down
2 changes: 1 addition & 1 deletion python/cudf_polars/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ authors = [
license = { text = "Apache 2.0" }
requires-python = ">=3.10"
dependencies = [
"polars>=1.20,<1.23",
"polars>=1.20,<1.24",
"pylibcudf==25.4.*,>=0.0.0a0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
classifiers = [
Expand Down

0 comments on commit b8ec71a

Please sign in to comment.