-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
slice giving incorrect empty result #9887
Comments
With |
I cannot reproduce? Anyone else? |
I can reproduce with Polars 0.18.8 InstructionsUse Podman on an M2 Mac with a machine with 2048 GB of memory and 4 CPUs. I didn't check if this is reproducible without Podman or with non-aarch64
|
I can reproduce this, only on aarch64 though. You can reproduce it on non-aarch64 systems by using QEMU through Docker:
This seems to affect LazyFrames created by
|
I did a quick bisect search to try to find which polars release started failing. I was able to determine that polars 0.16.18 shows the bug, but polars 0.16.17 behaves as expected. The release notes for 0.16.18 don't show anything obvious; there don't seem to be a lot of changes in that release. Unfortunately, I wasn't able to build polars from source inside my container, but someone who can reproduce the bug and can Reproduction test script (make sure there is any CSV file in #!/usr/bin/env python
import sys
import polars as pl
n = len(pl.scan_csv('/tmp/test.csv').slice(0, 100).collect())
if n == 0:
print('FAIL')
sys.exit(1)
print('ok') |
I can't reproduce with your example. Can you share the CSV file? |
The CSV file I was using was really simple:
|
Aha, it is only reproducible with the release build. |
Bug introduced in #7940 and fixed in #10467 @ritchie46 is this something we should be concerned about? Also, should we add a test? Seems kind of specific but also very simple test: def test_scan_csv(tmp_path):
(tmp_path / "a.csv").write_text("a\na")
assert len(pl.scan_csv(tmp_path / "a.csv").slice(0).collect()) == 1 |
@stinodego I'm pinging you randomly, hoping that you are less busy than Ritchie :) Any opinion on my last comment? |
Checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Reproducible example
Unfortunately I don't have a minimal example right now. This happens in a memory constrained environment.
Issue description
See example
Any ideas how to debug this further?
Plan:
Expected behavior
Should have same length
Installed versions
The text was updated successfully, but these errors were encountered: