[FEA] cudf-polars: `str.slice` rejects a column or expression as the offset
Maintainers usually reply within 2 days
@AVS0703 is already working on this.
Since Nov 4, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
The check lives in StringFunction.__init__ in dsl/expressions/string.py, where slice arguments after the first must be a non-float Literal. Start there and find the branch that raises the misleading 'does not support float literal start and stop values' message for a column or expression offset. At minimum, change the error text to say that only literal offsets are supported, then run the repro from the issue to confirm the new message appears. Per-row offsets would need a libcudf change and are a separate, larger task.
Written by the indexing model from the issue text.
Description
StringFunction.__init__ in dsl/expressions/string.py requires every slice argument after the first to be a Literal that is not a float, and otherwise raises Slice does not support float literal start and stop values. A column offset trips the same check, so the message is misleading: nothing about it is a float.
Repro is:
import polars as pl
t0 = pl.LazyFrame({"c0": [0]})
t0.select(pl.lit("xh").str.slice(pl.col("c0"), 1).alias("c1")).collect(engine=pl.GPUEngine(raise_on_fail=True))
At minimum the error text should say that only literal offsets are supported. Supporting per-row offsets needs a libcudf call that takes column starts and stops, which I have not looked for.
Related: pola-rs/polars#30187.
Environment: Polars 2.1.0, cudf-polars 26.12.00a616 (nightly wheels), Tesla V100, driver 535.161.08.
Tools: Claude Code
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.2k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 306
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/cudf
-
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
Maintainers usually reply within 2 days
-
feature request Python
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
[FEA] cudf-polars: support `min_horizontal` and `max_horizontal` on StringPossibly taken @lance-lii claimed this 7 days ago. Opencudf-polars feature request good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
NVIDIA/cudf#24981 · 1 comment ·
Maintainers usually reply within 2 days
-
improvement libcudf
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA/cudf#24930 · 1 comment ·
Maintainers usually reply within 2 days
-
[BUG] Replacing False with `cudf.NA` leaves the boolean value unchangedPossibly taken @pcbeingused333 claimed this 5 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
NVIDIA/cudf#24894 · 1 comment ·
Maintainers usually reply within 2 days
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 3 days
-
backlog
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
EchoTools/nevr-runtime#2385 ·
Maintainers usually reply within 1 day
-
type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
tensorflow/tflite-micro#3995 ·
Maintainers usually reply within 1 day
-
CPU update 1.31xOpenspeed-report
Difficulty 1/5 Under an hour Newbie friendliness 75/100
mw00/project-maya#961 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100