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

ORDER BY Mapping to error column #52656

Open
Max-Cheng opened this issue Nov 6, 2024 · 0 comments
Open

ORDER BY Mapping to error column #52656

Max-Cheng opened this issue Nov 6, 2024 · 0 comments
Labels
type/bug Something isn't working

Comments

@Max-Cheng
Copy link

Max-Cheng commented Nov 6, 2024

Steps to reproduce the behavior (Required)

set sql_dialect = 'trino';
SELECT Count(a) a
FROM   (SELECT 1 a)
ORDER  BY a; 

Expected behavior (Required)

trino:root> SELECT Count(a) a
         -> FROM   (SELECT 1 a)
         -> ORDER  BY a;
 a
---
 1
(1 row)

Real behavior (Required)

ERROR 1064 (HY000): Getting analyzing error. Detail message: 'a' must be an aggregate expression or appear in GROUP BY clause.

StarRocks version (Required)

branch-3.2.9

@Max-Cheng Max-Cheng added the type/bug Something isn't working label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant