This repository has been archived by the owner on Jan 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 109
TPC-H: unsupported feature: HAVING #56
Labels
enhancement
New feature or request
Comments
Stopped since this is not a priority in the OKRs |
Anyone have spare time to peek at this? |
@andremarianiello sure! Sorry for the delay, didn't see the PR. |
erizocosmico
added a commit
to erizocosmico/go-mysql-server
that referenced
this issue
Apr 23, 2019
Closes src-d#56 This PR adds support for the HAVING SQL clause, that allows filtering rows and has support for aggregation functions. For this, the following changes have been made: - New `Having` node, which is essentially a Filter, but it is a different node for the purpose of differentiating between the two of them during the analysis phase. - Having is now parsed. - A new rule for resolving the Having node has been added. Because of the way aggregations are executed (only inside a GroupBy node) it is not possible to execute them in any other node that's not a GroupBy. For this reason, this rule pushes down any aggregation on a Having node to its child, which is the GroupBy node. If the same aggregation is already done on the GroupBy, nothing will be added and the aggregation on the Having node will be replaced with a reference to the result of the aggregation in the GroupBy. Because pushing new aggregations to the GroupBy changes the resulting schema, a Project node is added wrapping the Having node projecting only the columns the GroupBy was initially projecting. Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
erizocosmico
added a commit
to erizocosmico/go-mysql-server
that referenced
this issue
Apr 24, 2019
Closes src-d#56 This PR adds support for the HAVING SQL clause, that allows filtering rows and has support for aggregation functions. For this, the following changes have been made: - New `Having` node, which is essentially a Filter, but it is a different node for the purpose of differentiating between the two of them during the analysis phase. - Having is now parsed. - A new rule for resolving the Having node has been added. Because of the way aggregations are executed (only inside a GroupBy node) it is not possible to execute them in any other node that's not a GroupBy. For this reason, this rule pushes down any aggregation on a Having node to its child, which is the GroupBy node. If the same aggregation is already done on the GroupBy, nothing will be added and the aggregation on the Having node will be replaced with a reference to the result of the aggregation in the GroupBy. Because pushing new aggregations to the GroupBy changes the resulting schema, a Project node is added wrapping the Having node projecting only the columns the GroupBy was initially projecting. Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
erizocosmico
added a commit
to erizocosmico/go-mysql-server
that referenced
this issue
Apr 24, 2019
Closes src-d#56 This PR adds support for the HAVING SQL clause, that allows filtering rows and has support for aggregation functions. For this, the following changes have been made: - New `Having` node, which is essentially a Filter, but it is a different node for the purpose of differentiating between the two of them during the analysis phase. - Having is now parsed. - A new rule for resolving the Having node has been added. Because of the way aggregations are executed (only inside a GroupBy node) it is not possible to execute them in any other node that's not a GroupBy. For this reason, this rule pushes down any aggregation on a Having node to its child, which is the GroupBy node. If the same aggregation is already done on the GroupBy, nothing will be added and the aggregation on the Having node will be replaced with a reference to the result of the aggregation in the GroupBy. Because pushing new aggregations to the GroupBy changes the resulting schema, a Project node is added wrapping the Having node projecting only the columns the GroupBy was initially projecting. Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Implement HAVING functionality: https://www.w3schools.com/sql/sql_having.asp
The text was updated successfully, but these errors were encountered: