diff --git a/src/AggregateFunctions/AggregateFunctionSequenceMatch.h b/src/AggregateFunctions/AggregateFunctionSequenceMatch.h index c7e2a700dd7..1a3da20e347 100644 --- a/src/AggregateFunctions/AggregateFunctionSequenceMatch.h +++ b/src/AggregateFunctions/AggregateFunctionSequenceMatch.h @@ -590,7 +590,7 @@ public: void insertResultInto(AggregateDataPtr place, IColumn & to, Arena *) const override { - const_cast(this->data(place)).sort(); + this->data(place).sort(); assert_cast(to).getData().push_back(count(place)); } diff --git a/src/Columns/ColumnLowCardinality.h b/src/Columns/ColumnLowCardinality.h index 0874f619b8a..5ace0a5d64f 100644 --- a/src/Columns/ColumnLowCardinality.h +++ b/src/Columns/ColumnLowCardinality.h @@ -3,7 +3,6 @@ #include #include #include -#include #include "ColumnsNumber.h" diff --git a/src/Common/ColumnsHashingImpl.h b/src/Common/ColumnsHashingImpl.h index 826e8d31ee9..cdd8dd20dd0 100644 --- a/src/Common/ColumnsHashingImpl.h +++ b/src/Common/ColumnsHashingImpl.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include #include diff --git a/src/DataTypes/DataTypeLowCardinality.cpp b/src/DataTypes/DataTypeLowCardinality.cpp index 6b1166dc26a..8f4b2bf7636 100644 --- a/src/DataTypes/DataTypeLowCardinality.cpp +++ b/src/DataTypes/DataTypeLowCardinality.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/src/Interpreters/ExpressionAnalyzer.cpp b/src/Interpreters/ExpressionAnalyzer.cpp index 1a112e9fef1..72d48efdd80 100644 --- a/src/Interpreters/ExpressionAnalyzer.cpp +++ b/src/Interpreters/ExpressionAnalyzer.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include diff --git a/src/Interpreters/HashJoin.h b/src/Interpreters/HashJoin.h index 986b4474473..ceddc9e4c7c 100644 --- a/src/Interpreters/HashJoin.h +++ b/src/Interpreters/HashJoin.h @@ -22,6 +22,7 @@ #include #include +#include namespace DB { diff --git a/src/Interpreters/IJoin.h b/src/Interpreters/IJoin.h index b9f88b57b37..3d313adcb6c 100644 --- a/src/Interpreters/IJoin.h +++ b/src/Interpreters/IJoin.h @@ -12,6 +12,7 @@ namespace DB class Block; struct ExtraBlock; +using ExtraBlockPtr = std::shared_ptr; class IJoin { diff --git a/src/Interpreters/InterpreterCreateQuery.h b/src/Interpreters/InterpreterCreateQuery.h index 07fca5f3910..735cc2122fa 100644 --- a/src/Interpreters/InterpreterCreateQuery.h +++ b/src/Interpreters/InterpreterCreateQuery.h @@ -16,6 +16,8 @@ class Context; class ASTCreateQuery; class ASTExpressionList; class ASTConstraintDeclaration; +class IDatabase; +using DatabasePtr = std::shared_ptr; /** Allows to create new table or database, diff --git a/src/Interpreters/InterpreterRenameQuery.h b/src/Interpreters/InterpreterRenameQuery.h index f2c08f22602..6fb0803d038 100644 --- a/src/Interpreters/InterpreterRenameQuery.h +++ b/src/Interpreters/InterpreterRenameQuery.h @@ -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 diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 43c5102fa32..f5c71570de3 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -14,6 +14,8 @@ #include +#include + #include #include #include diff --git a/src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp b/src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp index f045a92c394..e5263f54696 100644 --- a/src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp +++ b/src/Interpreters/MySQL/InterpretersMySQLDDLQuery.cpp @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include namespace DB diff --git a/src/Interpreters/TextLog.cpp b/src/Interpreters/TextLog.cpp index d1cc6a052e8..f60b6acae6f 100644 --- a/src/Interpreters/TextLog.cpp +++ b/src/Interpreters/TextLog.cpp @@ -1,11 +1,14 @@ #include -#include -#include + +#include +#include #include #include -#include +#include +#include #include -#include +#include + #include namespace DB diff --git a/src/Storages/ConstraintsDescription.cpp b/src/Storages/ConstraintsDescription.cpp index cff0b975a1d..e6315872a66 100644 --- a/src/Storages/ConstraintsDescription.cpp +++ b/src/Storages/ConstraintsDescription.cpp @@ -1,5 +1,8 @@ #include +#include +#include + #include #include #include diff --git a/src/Storages/ConstraintsDescription.h b/src/Storages/ConstraintsDescription.h index ddc9597f813..d6d2baefbd2 100644 --- a/src/Storages/ConstraintsDescription.h +++ b/src/Storages/ConstraintsDescription.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include namespace DB { diff --git a/src/Storages/LiveView/StorageLiveView.cpp b/src/Storages/LiveView/StorageLiveView.cpp index bdf82307b07..0803b3a9c9c 100644 --- a/src/Storages/LiveView/StorageLiveView.cpp +++ b/src/Storages/LiveView/StorageLiveView.cpp @@ -35,6 +35,7 @@ limitations under the License. */ #include #include #include +#include #include #include #include @@ -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); diff --git a/src/Storages/LiveView/StorageLiveView.h b/src/Storages/LiveView/StorageLiveView.h index 9c843dc71de..4a03e29342a 100644 --- a/src/Storages/LiveView/StorageLiveView.h +++ b/src/Storages/LiveView/StorageLiveView.h @@ -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 diff --git a/src/Storages/MergeTree/MergeTreeData.h b/src/Storages/MergeTree/MergeTreeData.h index 1f9ca97abaf..38e6c34e232 100644 --- a/src/Storages/MergeTree/MergeTreeData.h +++ b/src/Storages/MergeTree/MergeTreeData.h @@ -43,6 +43,7 @@ struct JobAndPool; class ExpressionActions; using ExpressionActionsPtr = std::shared_ptr; +using ManyExpressionActions = std::vector; namespace ErrorCodes { diff --git a/src/Storages/ReadInOrderOptimizer.cpp b/src/Storages/ReadInOrderOptimizer.cpp index 3613fbff5cf..ae49433dbc6 100644 --- a/src/Storages/ReadInOrderOptimizer.cpp +++ b/src/Storages/ReadInOrderOptimizer.cpp @@ -1,8 +1,10 @@ #include + +#include +#include +#include #include #include -#include -#include namespace DB { diff --git a/src/Storages/RocksDB/StorageEmbeddedRocksDB.cpp b/src/Storages/RocksDB/StorageEmbeddedRocksDB.cpp index ae28205d07b..80b25793806 100644 --- a/src/Storages/RocksDB/StorageEmbeddedRocksDB.cpp +++ b/src/Storages/RocksDB/StorageEmbeddedRocksDB.cpp @@ -3,6 +3,8 @@ #include #include + +#include #include #include diff --git a/src/Storages/StorageMaterializeMySQL.cpp b/src/Storages/StorageMaterializeMySQL.cpp index 7c9ec35f3c5..9be285adc69 100644 --- a/src/Storages/StorageMaterializeMySQL.cpp +++ b/src/Storages/StorageMaterializeMySQL.cpp @@ -8,6 +8,8 @@ #include #include +#include +#include #include #include @@ -19,6 +21,8 @@ #include #include +#include + namespace DB { diff --git a/src/Storages/System/StorageSystemDistributionQueue.cpp b/src/Storages/System/StorageSystemDistributionQueue.cpp index c8d8c88ec08..edba7c13b1c 100644 --- a/src/Storages/System/StorageSystemDistributionQueue.cpp +++ b/src/Storages/System/StorageSystemDistributionQueue.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/src/Storages/System/StorageSystemTables.cpp b/src/Storages/System/StorageSystemTables.cpp index 02aa7d8302a..c9b3223ee38 100644 --- a/src/Storages/System/StorageSystemTables.cpp +++ b/src/Storages/System/StorageSystemTables.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/src/Storages/System/StorageSystemZooKeeper.cpp b/src/Storages/System/StorageSystemZooKeeper.cpp index a3660cf2dec..287650ef86c 100644 --- a/src/Storages/System/StorageSystemZooKeeper.cpp +++ b/src/Storages/System/StorageSystemZooKeeper.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include diff --git a/src/Storages/System/attachSystemTablesImpl.h b/src/Storages/System/attachSystemTablesImpl.h index 0dc34c3c116..78e944f7d27 100644 --- a/src/Storages/System/attachSystemTablesImpl.h +++ b/src/Storages/System/attachSystemTablesImpl.h @@ -1,6 +1,8 @@ #pragma once #include +#include + namespace DB { diff --git a/src/Storages/tests/gtest_transform_query_for_external_database.cpp b/src/Storages/tests/gtest_transform_query_for_external_database.cpp index 48811c1c86a..835aebab900 100644 --- a/src/Storages/tests/gtest_transform_query_for_external_database.cpp +++ b/src/Storages/tests/gtest_transform_query_for_external_database.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include