Skip to content
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

Parquet nested slice pushdown gives incorrect results #18303

Closed
2 tasks done
coastalwhite opened this issue Aug 21, 2024 · 0 comments · Fixed by #18325
Closed
2 tasks done

Parquet nested slice pushdown gives incorrect results #18303

coastalwhite opened this issue Aug 21, 2024 · 0 comments · Fixed by #18325
Assignees
Labels
A-io-parquet Area: reading/writing Parquet files accepted Ready for implementation bug Something isn't working P-high Priority: high python Related to Python Polars

Comments

@coastalwhite
Copy link
Collaborator

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

import polars as pl
from polars.testing import assert_frame_equal

df = pl.DataFrame({
    'a': [{ 'x': "" }, { 'x': "0" }],
})

df.write_parquet('/tmp/t.parquet')
df2 = pl.scan_parquet('/tmp/t.parquet').slice(1, 1).collect()

assert_frame_equal(df, df2)

Log output

Traceback (most recent call last):
  File "/home/johndoe/Projects/polars/py-polars/polars/testing/asserts/frame.py", line 114, in assert_frame_equal
    _assert_series_values_equal(
  File "/home/johndoe/Projects/polars/py-polars/polars/testing/asserts/series.py", line 182, in _assert_series_values_equal
    raise_assertion_error(
  File "/home/johndoe/Projects/polars/py-polars/polars/testing/asserts/utils.py", line 12, in raise_assertion_error
    raise AssertionError(msg) from cause
AssertionError: Series are different (exact value mismatch)
[left]:  [{'x': '0'}]
[right]: [{'x': ''}]

Issue description

Nested parquet structures don't interact well with tail slice pushdown.

Expected behavior

This should give the same output.

Installed versions

Replace this line with the output of pl.show_versions(). Leave the backticks in place.
@coastalwhite coastalwhite added bug Something isn't working python Related to Python Polars needs triage Awaiting prioritization by a maintainer accepted Ready for implementation P-high Priority: high A-io-parquet Area: reading/writing Parquet files and removed needs triage Awaiting prioritization by a maintainer labels Aug 21, 2024
@coastalwhite coastalwhite self-assigned this Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-io-parquet Area: reading/writing Parquet files accepted Ready for implementation bug Something isn't working P-high Priority: high python Related to Python Polars
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant