2022-09-02 09:55:09 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Analyzer/IQueryTreeNode.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
/** Collect aggregate function nodes in node children.
|
|
|
|
* Do not visit subqueries.
|
|
|
|
*/
|
|
|
|
QueryTreeNodes collectAggregateFunctionNodes(const QueryTreeNodePtr & node);
|
|
|
|
|
|
|
|
/** Collect aggregate function nodes in node children and add them into result.
|
|
|
|
* Do not visit subqueries.
|
|
|
|
*/
|
|
|
|
void collectAggregateFunctionNodes(const QueryTreeNodePtr & node, QueryTreeNodes & result);
|
|
|
|
|
2023-02-08 14:41:24 +00:00
|
|
|
/** Returns true if there are aggregate function nodes in node children, false otherwise.
|
|
|
|
* Do not visit subqueries.
|
|
|
|
*/
|
|
|
|
bool hasAggregateFunctionNodes(const QueryTreeNodePtr & node);
|
|
|
|
|
2022-09-12 14:14:40 +00:00
|
|
|
/** Assert that there are no aggregate function nodes in node children.
|
2022-09-02 09:55:09 +00:00
|
|
|
* Do not visit subqueries.
|
|
|
|
*/
|
|
|
|
void assertNoAggregateFunctionNodes(const QueryTreeNodePtr & node, const String & assert_no_aggregates_place_message);
|
|
|
|
|
2023-02-08 14:41:24 +00:00
|
|
|
/** Assert that there are no GROUPING function nodes in node children.
|
2022-10-11 13:19:50 +00:00
|
|
|
* Do not visit subqueries.
|
|
|
|
*/
|
2023-02-08 14:41:24 +00:00
|
|
|
void assertNoGroupingFunctionNodes(const QueryTreeNodePtr & node, const String & assert_no_grouping_function_place_message);
|
2022-10-11 13:19:50 +00:00
|
|
|
|
2022-09-02 09:55:09 +00:00
|
|
|
}
|