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

Add functionality that handles HAVING clause validation #16406

Open
jzzhaofb-zz opened this issue Jul 8, 2021 · 2 comments
Open

Add functionality that handles HAVING clause validation #16406

jzzhaofb-zz opened this issue Jul 8, 2021 · 2 comments
Assignees

Comments

@jzzhaofb-zz
Copy link
Contributor

#16253 Currently validator allows all HAVING clause (does not detect invalid HAVING logic implication). We should implement logic that eliminate cases with invalid HAVING clause.

@jainxrohit
Copy link
Contributor

@jzzhaofb can you please add some examples here?

@jzzhaofb-zz
Copy link
Contributor Author

@jainxrohit Handling HAVING clause will be similar to solving WHERE clause problem (since both deal with filter containment #16405 ). HAVING clause is simply filter containment problem with aggregation function:

View Definition: SELECT SUM(a) AS mv_a, b FROM base GROUP BY b HAVING SUM(a) > 10
is a valid candidate for
Base Query: SELECT SUM(a) as total_a, b FROM base GROUP BY b HAVING SUM(a) > 15

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

No branches or pull requests

2 participants