mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 05:52:05 +00:00
23 lines
523 B
C++
23 lines
523 B
C++
#pragma once
|
|
|
|
#include <Analyzer/IQueryTreePass.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/* Eliminates functions of other keys in GROUP BY section.
|
|
* Ex.: GROUP BY x, f(x)
|
|
* Output: GROUP BY x
|
|
*/
|
|
class OptimizeGroupByFunctionKeysPass final : public IQueryTreePass
|
|
{
|
|
public:
|
|
String getName() override { return "OptimizeGroupByFunctionKeys"; }
|
|
|
|
String getDescription() override { return "Eliminates functions of other keys in GROUP BY section."; }
|
|
|
|
void run(QueryTreeNodePtr query_tree_node, ContextPtr context) override;
|
|
};
|
|
|
|
}
|