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

Projection pushdown on scalars changes output height #20221

Closed
2 tasks done
nameexhaustion opened this issue Dec 9, 2024 · 0 comments · Fixed by #20223
Closed
2 tasks done

Projection pushdown on scalars changes output height #20221

nameexhaustion opened this issue Dec 9, 2024 · 0 comments · Fixed by #20223
Assignees
Labels
A-optimizer Area: plan optimization accepted Ready for implementation bug Something isn't working P-low Priority: low python Related to Python Polars

Comments

@nameexhaustion
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

q = pl.LazyFrame({"a": range(5)}).select("a", b=pl.col("a").first()).select("b")
print(q.collect())
# shape: (1, 1)
# ┌─────┐
# │ b   │
# │ --- │
# │ i64 │
# ╞═════╡
# │ 0   │
# └─────┘
print(q.collect(projection_pushdown=False))
# shape: (5, 1)
# ┌─────┐
# │ b   │
# │ --- │
# │ i64 │
# ╞═════╡
# │ 0   │
# │ 0   │
# │ 0   │
# │ 0   │
# │ 0   │
# └─────┘

Log output

No response

Issue description

Result becomes 1 row instead instead of 5 rows with projection pushdown

Expected behavior

Maintains 5 rows

Installed versions

1.17.0

@nameexhaustion nameexhaustion added bug Something isn't working python Related to Python Polars P-low Priority: low A-optimizer Area: plan optimization labels Dec 9, 2024
@nameexhaustion nameexhaustion self-assigned this Dec 9, 2024
@github-project-automation github-project-automation bot moved this to Ready in Backlog Dec 9, 2024
@github-project-automation github-project-automation bot moved this from Ready to Done in Backlog Dec 11, 2024
@c-peters c-peters added the accepted Ready for implementation label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-optimizer Area: plan optimization accepted Ready for implementation bug Something isn't working P-low Priority: low python Related to Python Polars
Projects
Archived in project
2 participants