Remove some redundant includes to speed up build

This commit is contained in:
Alexander Kuzmenkov 2020-12-11 02:56:57 +03:00
parent 6f991725c3
commit dea446be2f
23 changed files with 45 additions and 10 deletions

View File

@ -590,7 +590,7 @@ public:
void insertResultInto(AggregateDataPtr place, IColumn & to, Arena *) const override
{
const_cast<Data &>(this->data(place)).sort();
this->data(place).sort();
assert_cast<ColumnUInt64 &>(to).getData().push_back(count(place));
}

View File

@ -3,7 +3,6 @@
#include <Columns/IColumnUnique.h>
#include <Common/typeid_cast.h>
#include <Common/assert_cast.h>
#include <AggregateFunctions/AggregateFunctionCount.h>
#include "ColumnsNumber.h"

View File

@ -1,6 +1,7 @@
#pragma once
#include <Columns/IColumn.h>
#include <Columns/ColumnNullable.h>
#include <Common/assert_cast.h>
#include <Common/HashTable/HashTableKeyHolder.h>
#include <Interpreters/AggregationCommon.h>

View File

@ -10,6 +10,7 @@
#include <DataTypes/DataTypeFactory.h>
#include <DataTypes/DataTypeLowCardinality.h>
#include <DataTypes/DataTypeNullable.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/DataTypeDate.h>
#include <DataTypes/DataTypeDateTime.h>
#include <Parsers/IAST.h>

View File

@ -12,6 +12,7 @@
#include <Parsers/DumpASTNode.h>
#include <DataTypes/DataTypeNullable.h>
#include <DataTypes/DataTypesNumber.h>
#include <Columns/IColumn.h>
#include <Interpreters/ExpressionAnalyzer.h>

View File

@ -22,6 +22,7 @@
#include <DataStreams/SizeLimits.h>
#include <DataStreams/IBlockStream_fwd.h>
#include <Core/Block.h>
namespace DB
{

View File

@ -12,6 +12,7 @@ namespace DB
class Block;
struct ExtraBlock;
using ExtraBlockPtr = std::shared_ptr<ExtraBlock>;
class IJoin
{

View File

@ -16,6 +16,8 @@ class Context;
class ASTCreateQuery;
class ASTExpressionList;
class ASTConstraintDeclaration;
class IDatabase;
using DatabasePtr = std::shared_ptr<IDatabase>;
/** Allows to create new table or database,

View File

@ -9,6 +9,7 @@ namespace DB
class Context;
class AccessRightsElements;
class DDLGuard;
/// To avoid deadlocks, we must acquire locks for tables in same order in any different RENAMES.
struct UniqueTableName

View File

@ -14,6 +14,8 @@
#include <Access/AccessFlags.h>
#include <AggregateFunctions/AggregateFunctionCount.h>
#include <Interpreters/ApplyWithAliasVisitor.h>
#include <Interpreters/ApplyWithSubqueryVisitor.h>
#include <Interpreters/InterpreterSelectQuery.h>

View File

@ -21,6 +21,8 @@
#include <Common/assert_cast.h>
#include <Interpreters/Context.h>
#include <Interpreters/InterpreterCreateQuery.h>
#include <Interpreters/ExpressionAnalyzer.h>
#include <Interpreters/TreeRewriter.h>
#include <Storages/IStorage.h>
namespace DB

View File

@ -1,11 +1,14 @@
#include <Interpreters/TextLog.h>
#include <DataTypes/DataTypeEnum.h>
#include <DataTypes/DataTypesNumber.h>
#include <Common/ClickHouseRevision.h>
#include <DataTypes/DataTypeDate.h>
#include <DataTypes/DataTypeDateTime.h>
#include <DataTypes/DataTypeDateTime64.h>
#include <DataTypes/DataTypeDate.h>
#include <DataTypes/DataTypeEnum.h>
#include <DataTypes/DataTypeLowCardinality.h>
#include <DataTypes/DataTypeString.h>
#include <Common/ClickHouseRevision.h>
#include <DataTypes/DataTypesNumber.h>
#include <array>
namespace DB

View File

@ -1,5 +1,8 @@
#include <Storages/ConstraintsDescription.h>
#include <Interpreters/ExpressionAnalyzer.h>
#include <Interpreters/TreeRewriter.h>
#include <Parsers/formatAST.h>
#include <Parsers/ParserCreateQuery.h>
#include <Parsers/parseQuery.h>

View File

@ -1,7 +1,7 @@
#pragma once
#include <Parsers/ASTConstraintDeclaration.h>
#include <Interpreters/ExpressionAnalyzer.h>
#include <Interpreters/ExpressionActions.h>
namespace DB
{

View File

@ -35,6 +35,7 @@ limitations under the License. */
#include <Parsers/ASTSubquery.h>
#include <Parsers/queryToString.h>
#include <Interpreters/DatabaseAndTableWithAlias.h>
#include <Interpreters/DatabaseCatalog.h>
#include <Interpreters/getTableExpressions.h>
#include <Interpreters/AddDefaultDatabaseVisitor.h>
#include <Access/AccessFlags.h>
@ -303,6 +304,11 @@ Block StorageLiveView::getHeader() const
return sample_block;
}
StoragePtr StorageLiveView::getParentStorage() const
{
return DatabaseCatalog::instance().getTable(select_table_id, global_context);
}
ASTPtr StorageLiveView::getInnerBlocksQuery()
{
std::lock_guard lock(sample_block_lock);

View File

@ -57,7 +57,7 @@ public:
{
return getStorageID().table_name + "_blocks";
}
StoragePtr getParentStorage() const { return DatabaseCatalog::instance().getTable(select_table_id, global_context); }
StoragePtr getParentStorage() const;
ASTPtr getInnerQuery() const { return inner_query->clone(); }
ASTPtr getInnerSubQuery() const

View File

@ -43,6 +43,7 @@ struct JobAndPool;
class ExpressionActions;
using ExpressionActionsPtr = std::shared_ptr<ExpressionActions>;
using ManyExpressionActions = std::vector<ExpressionActionsPtr>;
namespace ErrorCodes
{

View File

@ -1,8 +1,10 @@
#include <Storages/ReadInOrderOptimizer.h>
#include <Functions/IFunction.h>
#include <Interpreters/TableJoin.h>
#include <Interpreters/TreeRewriter.h>
#include <Storages/MergeTree/MergeTreeData.h>
#include <Storages/MergeTree/StorageFromMergeTreeDataPart.h>
#include <Interpreters/TableJoin.h>
#include <Functions/IFunction.h>
namespace DB
{

View File

@ -8,6 +8,8 @@
#include <Core/Settings.h>
#include <Interpreters/Context.h>
#include <Interpreters/ExpressionAnalyzer.h>
#include <Interpreters/TreeRewriter.h>
#include <Parsers/ASTFunction.h>
#include <Parsers/ASTSelectQuery.h>
@ -19,6 +21,8 @@
#include <Processors/Pipe.h>
#include <Processors/Transforms/FilterTransform.h>
#include <Storages/SelectQueryInfo.h>
namespace DB
{

View File

@ -4,6 +4,7 @@
#include <DataTypes/DataTypesNumber.h>
#include <Storages/System/StorageSystemDistributionQueue.h>
#include <Storages/Distributed/DirectoryMonitor.h>
#include <Storages/SelectQueryInfo.h>
#include <Storages/StorageDistributed.h>
#include <Storages/VirtualColumnUtils.h>
#include <Access/ContextAccess.h>

View File

@ -4,6 +4,7 @@
#include <DataTypes/DataTypeDateTime.h>
#include <DataTypes/DataTypeNullable.h>
#include <Storages/System/StorageSystemTables.h>
#include <Storages/SelectQueryInfo.h>
#include <Storages/VirtualColumnUtils.h>
#include <Databases/IDatabase.h>
#include <Access/ContextAccess.h>

View File

@ -2,6 +2,7 @@
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/DataTypeDateTime.h>
#include <Storages/System/StorageSystemZooKeeper.h>
#include <Storages/SelectQueryInfo.h>
#include <Parsers/ASTSelectQuery.h>
#include <Parsers/ASTIdentifier.h>
#include <Parsers/ASTLiteral.h>

View File

@ -1,6 +1,8 @@
#pragma once
#include <Databases/IDatabase.h>
#include <Interpreters/DatabaseCatalog.h>
namespace DB
{