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

Support count(1) for queries on UI #1420

Open
arina-ielchiieva opened this issue Oct 11, 2021 · 6 comments
Open

Support count(1) for queries on UI #1420

arina-ielchiieva opened this issue Oct 11, 2021 · 6 comments

Comments

Projects
SQL
To do
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
@arina-ielchiieva
Copy link

@arina-ielchiieva arina-ielchiieva commented Oct 11, 2021

count(1) for queries does not work on UI

image

@bluestreak01
Copy link
Member

@bluestreak01 bluestreak01 commented Oct 11, 2021

what does count(1) do differently compared to existing count() ?

@arina-ielchiieva
Copy link
Author

@arina-ielchiieva arina-ielchiieva commented Oct 11, 2021

Nothing, they are equivalent.

@bluestreak01 bluestreak01 added this to To do in SQL via automation Oct 11, 2021
@drew5494
Copy link

@drew5494 drew5494 commented Oct 19, 2021

Hi can I try to work on this?

@ideoma
Copy link
Collaborator

@ideoma ideoma commented Oct 20, 2021

Yes, please.

Look at creating Function Factory, exactly same as count() but with signature as count(int const).

@drew5494
Copy link

@drew5494 drew5494 commented Oct 23, 2021

Is it just modifying line 207 in SqlCodeGenerator.java to accept one argument? @ideoma

@ideoma
Copy link
Collaborator

@ideoma ideoma commented Oct 24, 2021

@drew5494
I wouldn't go to change parser but try to add CountConstGroupByFunctionFactory same as CountGroupByFunctionFactory but with signature count(i) instead of count()

CountGroupByFunctionFactory is registered in 2 places, place registration for the new CountConstGroupByFunctionFactory at the same places, add tests and that should be it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment