Analyzer move passes into separate folder

This commit is contained in:
Maksim Kita 2022-10-11 16:14:33 +02:00
parent 3a22e37691
commit eba9607696
18 changed files with 23 additions and 22 deletions

View File

@ -1,4 +1,4 @@
#include <Analyzer/CountDistinctPass.h>
#include <Analyzer/Passes/CountDistinctPass.h>
#include <AggregateFunctions/AggregateFunctionFactory.h>
#include <AggregateFunctions/IAggregateFunction.h>

View File

@ -5,7 +5,7 @@
namespace DB
{
/** Optimize single countDistinct into count over subquery.
/** Optimize single `countDistinct` into `count` over subquery.
*
* Example: SELECT countDistinct(column) FROM table;
* Result: SELECT count() FROM (SELECT column FROM table GROUP BY column);

View File

@ -1,4 +1,4 @@
#include <Analyzer/CustomizeFunctionsPass.h>
#include <Analyzer/Passes/CustomizeFunctionsPass.h>
#include <AggregateFunctions/AggregateFunctionFactory.h>
#include <AggregateFunctions/IAggregateFunction.h>

View File

@ -1,4 +1,4 @@
#include <Analyzer/IfChainToMultiIfPass.h>
#include <Analyzer/Passes/IfChainToMultiIfPass.h>
#include <DataTypes/DataTypesNumber.h>

View File

@ -5,7 +5,7 @@
namespace DB
{
/** Convert if chain into multiIf.
/** Convert `if` chain into single `multiIf`.
* Replace if(cond_1, then_1_value, if(cond_2, ...)) chains into multiIf(cond_1, then_1_value, cond_2, ...).
*
* Example: SELECT if(cond_1, then_1_value, if(cond_2, then_2_value, else_value));

View File

@ -1,4 +1,4 @@
#include <Analyzer/IfConstantConditionPass.h>
#include <Analyzer/Passes/IfConstantConditionPass.h>
#include <Analyzer/InDepthQueryTreeVisitor.h>
#include <Analyzer/FunctionNode.h>

View File

@ -5,7 +5,7 @@
namespace DB
{
/** Convert if with constant condition or multiIf into true condition argument value
/** Convert `if` with constant condition or `multiIf` with single constant condition into true condition argument value
* or false condition argument value.
* Example: SELECT if(1, true_value, false_value);
* Result: SELECT true_value;

View File

@ -1,4 +1,4 @@
#include <Analyzer/MultiIfToIfPass.h>
#include <Analyzer/Passes/MultiIfToIfPass.h>
#include <Analyzer/InDepthQueryTreeVisitor.h>
#include <Analyzer/FunctionNode.h>

View File

@ -5,7 +5,7 @@
namespace DB
{
/** Convert multiIf with single argument into if.
/** Convert `multiIf` with single argument into `if`.
* Example: SELECT multiIf(x, 1, 0);
* Result: SELECT if(x, 1, 0);
*/

View File

@ -1,4 +1,4 @@
#include <Analyzer/NormalizeCountVariantsPass.h>
#include <Analyzer/Passes/NormalizeCountVariantsPass.h>
#include <AggregateFunctions/AggregateFunctionFactory.h>
#include <AggregateFunctions/IAggregateFunction.h>

View File

@ -5,8 +5,8 @@
namespace DB
{
/** Convert if with constant condition or multiIf into true condition argument value
* or false condition argument value.
/** Remove single literal argument from `count`. Convert `sum` with single `1` literal argument into `count`.
*
* Example: SELECT count(1)
* Result: SELECT count();
*

View File

@ -1,4 +1,4 @@
#include <Analyzer/OrderByTupleEliminationPass.h>
#include <Analyzer/Passes/OrderByTupleEliminationPass.h>
#include <Analyzer/InDepthQueryTreeVisitor.h>
#include <Analyzer/FunctionNode.h>

View File

@ -1,4 +1,4 @@
#include <Analyzer/QueryAnalysisPass.h>
#include <Analyzer/Passes/QueryAnalysisPass.h>
#include <IO/WriteBuffer.h>
#include <IO/WriteHelpers.h>

View File

@ -1,13 +1,13 @@
#include <Analyzer/QueryTreePassManager.h>
#include <Analyzer/QueryAnalysisPass.h>
#include <Analyzer/MultiIfToIfPass.h>
#include <Analyzer/IfConstantConditionPass.h>
#include <Analyzer/IfChainToMultiIfPass.h>
#include <Analyzer/OrderByTupleEliminationPass.h>
#include <Analyzer/NormalizeCountVariantsPass.h>
#include <Analyzer/CountDistinctPass.h>
#include <Analyzer/CustomizeFunctionsPass.h>
#include <Analyzer/Passes/QueryAnalysisPass.h>
#include <Analyzer/Passes/MultiIfToIfPass.h>
#include <Analyzer/Passes/IfConstantConditionPass.h>
#include <Analyzer/Passes/IfChainToMultiIfPass.h>
#include <Analyzer/Passes/OrderByTupleEliminationPass.h>
#include <Analyzer/Passes/NormalizeCountVariantsPass.h>
#include <Analyzer/Passes/CountDistinctPass.h>
#include <Analyzer/Passes/CustomizeFunctionsPass.h>
#include <IO/WriteHelpers.h>
#include <IO/Operators.h>

View File

@ -257,6 +257,7 @@ add_object_library(clickhouse_databases Databases)
add_object_library(clickhouse_databases_mysql Databases/MySQL)
add_object_library(clickhouse_disks Disks)
add_object_library(clickhouse_analyzer Analyzer)
add_object_library(clickhouse_analyzer_passes Analyzer/Passes)
add_object_library(clickhouse_planner Planner)
add_object_library(clickhouse_interpreters Interpreters)
add_object_library(clickhouse_interpreters_cache Interpreters/Cache)