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

refactor(planner): use AggInputRefResolver to handle group by expr #630

Merged
merged 1 commit into from
Apr 18, 2022

Conversation

Fedomn
Copy link
Member

@Fedomn Fedomn commented Apr 17, 2022

fix part of #539

the original group by expression support (#535) seems not very clear for resolving InputRef, so I refactor the main logic to InputRefResolver. And fix panic for:

select v2 + 1 + count(*) from t group by v2 + 1;

but it still leaves some issues:

  • panic select v2 + 2 + count(*) from t group by v2 + 1;

Signed-off-by: Fedomn fedomn.ma@gmail.com

Signed-off-by: Fedomn <fedomn.ma@gmail.com>
@skyzh skyzh requested review from xxchan and skyzh April 17, 2022 13:39
Copy link
Member

@skyzh skyzh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's cool, thanks!

select sum(v1), v2 + 1 as a, count(*) from t group by a
----
3 2 2
7 3 2
5 4 1

query II rowsort
query III rowsort
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to verify if provided column number is the same as user input? cc @wangrunji0408

Copy link
Member

@wangrunji0408 wangrunji0408 Apr 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it should verify. But now the database returns a string, which makes it hard to split user input into columns (

@skyzh skyzh merged commit a5644b1 into risinglightdb:main Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants