You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lithomas1 opened this issue
Jul 10, 2024
· 1 comment
· Fixed by #17631
Assignees
Labels
A-io-jsonArea: reading/writing JSON filesacceptedReady for implementationbugSomething isn't workingP-mediumPriority: mediumpythonRelated to Python PolarsregressionIssue introduced by a new release
When scanning a ndjson file and doing a column projection afterwards with select (selecting the row-index and a column from the scanned dataframe), polars will drop the row-index.
(When the row_index is not in the selected columns, I believe the optimizer passes it as None in the IR, so I think swapping the conditions should be correct for both row_index being selected and not being selected. I can try to submit a PR for this if the patch is correct.)
Expected behavior
The row index should be kept (like it is for CSV, and when the projection_pushdown option is False in collect.
A-io-jsonArea: reading/writing JSON filesacceptedReady for implementationbugSomething isn't workingP-mediumPriority: mediumpythonRelated to Python PolarsregressionIssue introduced by a new release
Checks
Reproducible example
Log output
No response
Issue description
When scanning a ndjson file and doing a column projection afterwards with select (selecting the row-index and a column from the scanned dataframe), polars will drop the row-index.
I believe the correct solution is just to swap the row index and projection conditions here
235ebee#diff-f91032885fa26496b1aa443e731f1dbb9d346e0567d4bafc96999839209e01b1R319-R326
(When the row_index is not in the selected columns, I believe the optimizer passes it as None in the IR, so I think swapping the conditions should be correct for both row_index being selected and not being selected. I can try to submit a PR for this if the patch is correct.)
Expected behavior
The row index should be kept (like it is for CSV, and when the
projection_pushdown
option is False in collect.Installed versions
The text was updated successfully, but these errors were encountered: