Skip to content

Remove duplicated alias in Sort #14895

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

Open
jayzhan211 opened this issue Feb 26, 2025 · 0 comments · May be fixed by #14781
Open

Remove duplicated alias in Sort #14895

jayzhan211 opened this issue Feb 26, 2025 · 0 comments · May be fixed by #14781
Labels
bug Something isn't working

Comments

@jayzhan211
Copy link
Contributor

Describe the bug

query TT
explain SELECT count(*) order by count(*);
----
logical_plan
01)Projection: count(*)
02)--Sort: count(Int64(1)) AS count(*) AS count(*) ASC NULLS LAST
03)----Projection: count(Int64(1)) AS count(*), count(Int64(1))
04)------Aggregate: groupBy=[[]], aggr=[[count(Int64(1))]]
05)--------EmptyRelation
physical_plan
01)ProjectionExec: expr=[1 as count(*)]
02)--PlaceholderRowExec

We can see that Sort has two count(*)

Sort: count(Int64(1)) AS count(*) AS count(*) ASC NULLS LAST

I think ideally we should has single alias

To Reproduce

No response

Expected behavior

No response

Additional context

No response

@jayzhan211 jayzhan211 added the bug Something isn't working label Feb 26, 2025
This was referenced Mar 4, 2025
phillipleblanc added a commit to spiceai/datafusion that referenced this issue May 7, 2025
UPSTREAM NOTE: This was attempted to be fixed with
apache#15008 but was closed

This is the tracking issue on DataFusion:
apache#14895
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant