Merge pull request #4326 from yandex/duplicate-includes

Removed duplicate includes
This commit is contained in:
alexey-milovidov 2019-02-10 22:31:37 +03:00 committed by GitHub
commit 0dd618b9ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
65 changed files with 115 additions and 111 deletions

View File

@ -67,7 +67,6 @@
#include <Storages/StorageDistributed.h>
#include <Databases/DatabaseMemory.h>
#include <Common/StatusFile.h>
#include <daemon/OwnPatternFormatter.h>
namespace DB

View File

@ -16,12 +16,11 @@
#include <Common/getFQDNOrHostName.h>
#include <Common/CurrentThread.h>
#include <Common/setThreadName.h>
#include <Compression/CompressedReadBuffer.h>
#include <Compression/CompressedWriteBuffer.h>
#include <IO/ReadBufferFromIStream.h>
#include <IO/ZlibInflatingReadBuffer.h>
#include <IO/ReadBufferFromString.h>
#include <IO/ConcatReadBuffer.h>
#include <Compression/CompressedReadBuffer.h>
#include <Compression/CompressedWriteBuffer.h>
#include <IO/WriteBufferFromString.h>
#include <IO/WriteBufferFromHTTPServerResponse.h>
#include <IO/WriteBufferFromFile.h>

View File

@ -6,8 +6,6 @@
#include <Common/ClickHouseRevision.h>
#include <Common/CurrentThread.h>
#include <Common/Stopwatch.h>
#include <Common/ClickHouseRevision.h>
#include <Common/Stopwatch.h>
#include <Common/NetException.h>
#include <Common/setThreadName.h>
#include <Common/config_version.h>

View File

@ -1,12 +1,12 @@
#pragma once
#include <IO/VarInt.h>
#include <IO/WriteHelpers.h>
#include <array>
#include <DataTypes/DataTypesNumber.h>
#include <Columns/ColumnNullable.h>
#include <AggregateFunctions/IAggregateFunction.h>
#include <IO/WriteHelpers.h>
namespace DB

View File

@ -5,15 +5,17 @@
#include <DataTypes/DataTypeArray.h>
#include <DataTypes/DataTypeNullable.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/DataTypeLowCardinality.h>
#include <IO/WriteBuffer.h>
#include <IO/WriteHelpers.h>
#include <Interpreters/Context.h>
#include <Common/StringUtils/StringUtils.h>
#include <Common/typeid_cast.h>
#include <Poco/String.h>
#include <DataTypes/DataTypeLowCardinality.h>
namespace DB

View File

@ -3,7 +3,6 @@
#include <DataTypes/DataTypeAggregateFunction.h>
#include <AggregateFunctions/IAggregateFunction.h>
#include <Columns/ColumnAggregateFunction.h>
#include <DataTypes/DataTypeAggregateFunction.h>
#include <Common/typeid_cast.h>

View File

@ -5,8 +5,6 @@
#include <ext/bit_cast.h>
#include <AggregateFunctions/UniquesHashSet.h>
#include <IO/WriteHelpers.h>
#include <IO/ReadHelpers.h>
@ -14,13 +12,14 @@
#include <DataTypes/DataTypeTuple.h>
#include <Interpreters/AggregationCommon.h>
#include <Common/HashTable/HashSet.h>
#include <Common/HyperLogLogWithSmallSetOptimization.h>
#include <Common/CombinedCardinalityEstimator.h>
#include <Common/MemoryTracker.h>
#include <Common/typeid_cast.h>
#include <AggregateFunctions/UniquesHashSet.h>
#include <AggregateFunctions/IAggregateFunction.h>
#include <AggregateFunctions/UniqVariadicHash.h>

View File

@ -1,6 +1,9 @@
#pragma once
#include <Common/CombinedCardinalityEstimator.h>
#include <Common/FieldVisitors.h>
#include <Common/SipHash.h>
#include <Common/typeid_cast.h>
#include <DataTypes/DataTypeTuple.h>
#include <DataTypes/DataTypeUUID.h>
@ -14,10 +17,7 @@
#include <Columns/ColumnVector.h>
#include <Columns/ColumnsNumber.h>
#include <Common/FieldVisitors.h>
#include <Common/SipHash.h>
#include <Common/typeid_cast.h>
namespace DB
{

View File

@ -1,15 +1,19 @@
#pragma once
#include <Common/FieldVisitors.h>
#include <Common/typeid_cast.h>
#include <AggregateFunctions/IAggregateFunction.h>
#include <AggregateFunctions/UniqVariadicHash.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/DataTypeTuple.h>
#include <DataTypes/DataTypeUUID.h>
#include <Columns/ColumnsNumber.h>
#include <IO/ReadHelpers.h>
#include <IO/WriteHelpers.h>
#include <Common/typeid_cast.h>
namespace DB

View File

@ -2,9 +2,9 @@
#include <Common/PODArray.h>
#include <Common/NaNUtils.h>
#include <Core/Types.h>
#include <IO/WriteBuffer.h>
#include <IO/ReadBuffer.h>
#include <Core/Types.h>
#include <IO/VarInt.h>

View File

@ -1,7 +1,5 @@
#pragma once
#include <optional>
#include <common/logger_useful.h>
#include <Poco/Net/StreamSocket.h>

View File

@ -1,4 +1,5 @@
#include <Columns/ColumnAggregateFunction.h>
#include <Columns/ColumnsCommon.h>
#include <AggregateFunctions/AggregateFunctionState.h>
#include <DataStreams/ColumnGathererStream.h>
#include <IO/WriteBufferFromArena.h>
@ -6,7 +7,6 @@
#include <Common/AlignedBuffer.h>
#include <Common/typeid_cast.h>
#include <Common/Arena.h>
#include <Columns/ColumnsCommon.h>
namespace DB

View File

@ -16,8 +16,6 @@
#ifdef __SSE2__
#include <emmintrin.h>
#include <Columns/ColumnsCommon.h>
#endif

View File

@ -3,8 +3,8 @@
#endif
#include <Columns/IColumn.h>
#include <Common/typeid_cast.h>
#include <Columns/ColumnVector.h>
#include <Common/typeid_cast.h>
#include <Common/HashTable/HashSet.h>
#include <Common/HashTable/HashMap.h>

View File

@ -1,6 +1,5 @@
#include <Columns/FilterDescription.h>
#include <Common/typeid_cast.h>
#include <Columns/FilterDescription.h>
#include <Columns/ColumnsNumber.h>
#include <Columns/ColumnNullable.h>
#include <Columns/ColumnConst.h>

View File

@ -200,8 +200,6 @@ std::enable_if_t<std::/*has_unique_object_representations_v*/is_standard_layout_
return hash.get64();
}
#include <string>
inline UInt64 sipHash64(const std::string & s)
{
return sipHash64(s.data(), s.size());

View File

@ -1,17 +1,18 @@
#include <pthread.h>
#if defined(__APPLE__)
#include <pthread.h>
#elif defined(__FreeBSD__)
#include <pthread.h>
#include <pthread_np.h>
#include <pthread_np.h>
#else
#include <sys/prctl.h>
#include <sys/prctl.h>
#endif
#include <pthread.h>
#include <cstring>
#include <Common/Exception.h>
#include <Common/setThreadName.h>
namespace DB
{
namespace ErrorCodes
@ -23,6 +24,11 @@ namespace ErrorCodes
void setThreadName(const char * name)
{
#ifndef NDEBUG
if (strlen(name) > 15)
throw DB::Exception("Thread name cannot be longer than 15 bytes", DB::ErrorCodes::PTHREAD_ERROR);
#endif
#if defined(__FreeBSD__)
pthread_set_name_np(pthread_self(), name);
return;

View File

@ -5,7 +5,6 @@
#include <Compression/CompressionInfo.h>
#include <Compression/CompressionFactory.h>
#include <Compression/LZ4_decompress_faster.h>
#include "CompressionCodecLZ4.h"
#include <Parsers/IAST.h>
#include <Parsers/ASTLiteral.h>
#include <IO/WriteHelpers.h>

View File

@ -1,6 +1,3 @@
#include <IO/WriteBuffer.h>
#include <IO/WriteHelpers.h>
#include <Columns/ColumnFixedString.h>
#include <Columns/ColumnsNumber.h>
#include <Columns/ColumnConst.h>
@ -10,6 +7,7 @@
#include <DataTypes/DataTypeFixedString.h>
#include <DataTypes/DataTypeFactory.h>
#include <IO/WriteBuffer.h>
#include <IO/ReadHelpers.h>
#include <IO/WriteHelpers.h>
#include <IO/VarInt.h>

View File

@ -3,11 +3,12 @@
#include <Interpreters/ExternalDictionaries.h>
#include <Storages/StorageDictionary.h>
#include <common/logger_useful.h>
#include <Parsers/IAST.h>
#include <IO/WriteBufferFromString.h>
#include <IO/Operators.h>
#include <Parsers/ParserCreateQuery.h>
#include <Parsers/parseQuery.h>
#include <Parsers/IAST.h>
namespace DB
{

View File

@ -2,6 +2,7 @@
#include <DataTypes/DataTypeArray.h>
#include <DataTypes/DataTypeFunction.h>
#include <DataTypes/DataTypeLowCardinality.h>
#include <Columns/ColumnArray.h>
#include <Columns/ColumnConst.h>
#include <Columns/ColumnFunction.h>
@ -9,7 +10,6 @@
#include <Functions/IFunction.h>
#include <Functions/FunctionHelpers.h>
#include <IO/WriteHelpers.h>
#include <DataTypes/DataTypeLowCardinality.h>
namespace DB

View File

@ -7,6 +7,7 @@
#include <DataTypes/DataTypeInterval.h>
#include <DataTypes/DataTypeAggregateFunction.h>
#include <DataTypes/Native.h>
#include <DataTypes/NumberTraits.h>
#include <Columns/ColumnVector.h>
#include <Columns/ColumnDecimal.h>
#include <Columns/ColumnConst.h>
@ -16,7 +17,6 @@
#include "intDiv.h"
#include "castTypeToEither.h"
#include "FunctionFactory.h"
#include <DataTypes/NumberTraits.h>
#include <Common/typeid_cast.h>
#include <Common/Arena.h>
#include <Common/config.h>

View File

@ -17,7 +17,6 @@
#include <DataTypes/DataTypeTuple.h>
#include <DataTypes/DataTypeEnum.h>
#include <DataTypes/getLeastSupertype.h>
#include <DataTypes/getLeastSupertype.h>
#include <Interpreters/castColumn.h>

View File

@ -19,15 +19,15 @@
#include <Dictionaries/Embedded/RegionsHierarchies.h>
#include <Dictionaries/Embedded/RegionsNames.h>
#if USE_MYSQL
#include <Dictionaries/Embedded/TechDataHierarchy.h>
#endif
#include <IO/WriteHelpers.h>
#include <Common/config.h>
#include <Common/typeid_cast.h>
#if USE_MYSQL
#include <Dictionaries/Embedded/TechDataHierarchy.h>
#endif
namespace DB
{

View File

@ -8,6 +8,10 @@
#include <murmurhash2.h>
#include <murmurhash3.h>
#include <Common/SipHash.h>
#include <Common/typeid_cast.h>
#include <Common/HashTable/Hash.h>
#include <Common/config.h>
#if USE_XXHASH
#include <xxhash.h>
@ -15,8 +19,6 @@
#include <Poco/ByteOrder.h>
#include <Common/SipHash.h>
#include <Common/typeid_cast.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/DataTypeString.h>
#include <DataTypes/DataTypeDate.h>
@ -31,7 +33,6 @@
#include <Columns/ColumnFixedString.h>
#include <Columns/ColumnArray.h>
#include <Columns/ColumnTuple.h>
#include <Common/HashTable/Hash.h>
#include <Functions/IFunction.h>
#include <Functions/FunctionHelpers.h>

View File

@ -10,9 +10,9 @@
#include <Columns/ColumnConst.h>
#include <Columns/ColumnVector.h>
#include <Common/typeid_cast.h>
#include <Common/memcpySmall.h>
#include <Functions/IFunction.h>
#include <Functions/FunctionHelpers.h>
#include <Common/memcpySmall.h>
namespace DB

View File

@ -1,6 +1,7 @@
#pragma once
#include <DataTypes/DataTypeArray.h>
#include <DataTypes/DataTypeString.h>
#include <Columns/ColumnString.h>
#include <Columns/ColumnFixedString.h>
#include <Columns/ColumnConst.h>
@ -10,7 +11,6 @@
#include <Functions/IFunction.h>
#include <Functions/Regexps.h>
#include <Functions/FunctionHelpers.h>
#include <DataTypes/DataTypeString.h>
#include <IO/WriteHelpers.h>

View File

@ -1,9 +1,10 @@
#pragma once
#include <Core/Types.h>
#include <Core/Defines.h>
#include <Core/TypeListNumber.h>
#include <Columns/IColumn.h>
#include <Columns/ColumnVector.h>
#include <Core/TypeListNumber.h>
#include <Common/typeid_cast.h>
#include <ext/range.h>

View File

@ -3,6 +3,9 @@
#include <Common/LRUCache.h>
#include <Columns/ColumnConst.h>
#include <Columns/ColumnNullable.h>
#include <Columns/ColumnArray.h>
#include <Columns/ColumnTuple.h>
#include <Columns/ColumnLowCardinality.h>
#include <DataTypes/DataTypeArray.h>
#include <DataTypes/DataTypeNothing.h>
#include <DataTypes/DataTypeNullable.h>
@ -10,10 +13,6 @@
#include <DataTypes/Native.h>
#include <DataTypes/DataTypeLowCardinality.h>
#include <DataTypes/getLeastSupertype.h>
#include <Columns/ColumnArray.h>
#include <Columns/ColumnConst.h>
#include <Columns/ColumnTuple.h>
#include <Columns/ColumnLowCardinality.h>
#include <Functions/FunctionHelpers.h>
#include <Functions/IFunction.h>
#include <Interpreters/ExpressionActions.h>

View File

@ -8,9 +8,9 @@
#include <Columns/ColumnNullable.h>
#include <Columns/ColumnString.h>
#include <Common/HashTable/ClearableHashSet.h>
#include <Common/ColumnsHashing.h>
#include <Interpreters/AggregationCommon.h>
#include <IO/WriteHelpers.h>
#include <Common/ColumnsHashing.h>
namespace DB

View File

@ -1,7 +1,7 @@
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionBase64Conversion.h>
#if USE_BASE64
#include <DataTypes/DataTypeString.h>
#include <Functions/FunctionFactory.h>
namespace DB
{

View File

@ -1,7 +1,7 @@
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionBase64Conversion.h>
#if USE_BASE64
#include <DataTypes/DataTypeString.h>
#include <Functions/FunctionFactory.h>
namespace DB
{

View File

@ -5,6 +5,8 @@
#include <DataTypes/DataTypeFixedString.h>
#include <DataTypes/DataTypeTuple.h>
#include <DataTypes/DataTypeNullable.h>
#include <DataTypes/NumberTraits.h>
#include <DataTypes/getLeastSupertype.h>
#include <Columns/ColumnVector.h>
#include <Columns/ColumnDecimal.h>
#include <Columns/ColumnString.h>
@ -16,8 +18,6 @@
#include <Common/typeid_cast.h>
#include <Functions/IFunction.h>
#include <Functions/FunctionHelpers.h>
#include <DataTypes/NumberTraits.h>
#include <DataTypes/getLeastSupertype.h>
#include <Functions/GatherUtils/GatherUtils.h>
#include <Functions/GatherUtils/Algorithms.h>
#include <Functions/FunctionIfBase.h>

View File

@ -8,9 +8,9 @@
#include <Columns/ColumnConst.h>
#include <Columns/ColumnsNumber.h>
#include <Common/Arena.h>
#include <common/StringRef.h>
#include <Common/HashTable/HashMap.h>
#include <Common/typeid_cast.h>
#include <common/StringRef.h>
#include <Functions/IFunction.h>
#include <Functions/FunctionHelpers.h>
#include <Functions/FunctionFactory.h>

View File

@ -1,7 +1,7 @@
#include <Functions/FunctionFactory.h>
#include <Functions/FunctionBase64Conversion.h>
#if USE_BASE64
#include <DataTypes/DataTypeString.h>
#include <Functions/FunctionFactory.h>
namespace DB
{

View File

@ -1,9 +1,9 @@
#pragma once
#if defined(__linux__)
#include <boost/noncopyable.hpp>
#if defined(__linux__)
/// https://stackoverflow.com/questions/20759750/resolving-redefinition-of-timespec-in-time-h
#define timespec linux_timespec
#define timeval linux_timeval
@ -41,7 +41,6 @@ struct AIOContext : private boost::noncopyable
#elif defined(__FreeBSD__)
#include <boost/noncopyable.hpp>
#include <aio.h>
#include <sys/types.h>
#include <sys/event.h>

View File

@ -1,9 +1,13 @@
#include <IO/HTTPCommon.h>
#include <Poco/Version.h>
#include <Common/config.h>
#include <Common/DNSResolver.h>
#include <Common/Exception.h>
#include <Common/config.h>
#include <Common/PoolBase.h>
#include <Common/ProfileEvents.h>
#include <Common/SipHash.h>
#include <Poco/Version.h>
#if USE_POCO_NETSSL
#include <Poco/Net/AcceptCertificateHandler.h>
@ -15,14 +19,11 @@
#include <Poco/Net/SSLManager.h>
#endif
#include <tuple>
#include <unordered_map>
#include <Poco/Net/HTTPServerResponse.h>
#include <Poco/Util/Application.h>
#include <Common/PoolBase.h>
#include <Common/ProfileEvents.h>
#include <Common/SipHash.h>
#include <tuple>
#include <unordered_map>
#include <sstream>

View File

@ -1,10 +1,13 @@
#include <IO/ReadBufferFromHDFS.h>
#include <Common/config.h>
#if USE_HDFS
#include <Poco/URI.h>
#include <IO/ReadBufferFromHDFS.h>
#include <IO/HDFSCommon.h>
#include <Poco/URI.h>
#include <hdfs/hdfs.h>
namespace DB
{
namespace ErrorCodes

View File

@ -1,7 +1,5 @@
#pragma once
#include <Common/config.h>
#if USE_HDFS
#include <IO/ReadBuffer.h>
#include <IO/BufferWithOwnMemory.h>

View File

@ -1,8 +1,7 @@
#include <Poco/Net/NetException.h>
#include <Common/Exception.h>
#include <IO/ReadBufferFromPocoSocket.h>
#include <Common/Exception.h>
#include <Common/NetException.h>
#include <Common/Stopwatch.h>

View File

@ -2,6 +2,7 @@
#include <Common/hex.h>
#include <Common/PODArray.h>
#include <Common/StringUtils/StringUtils.h>
#include <Common/memcpySmall.h>
#include <Formats/FormatSettings.h>
#include <IO/WriteHelpers.h>
#include <IO/WriteBufferFromString.h>
@ -9,7 +10,6 @@
#include <IO/Operators.h>
#include <common/find_symbols.h>
#include <stdlib.h>
#include <Common/memcpySmall.h>
#ifdef __SSE2__
#include <emmintrin.h>

View File

@ -11,10 +11,11 @@
#include <common/DateLUT.h>
#include <common/LocalDate.h>
#include <common/LocalDateTime.h>
#include <common/StringRef.h>
#include <Core/Types.h>
#include <Core/UUID.h>
#include <common/StringRef.h>
#include <Common/Exception.h>
#include <Common/StringUtils/StringUtils.h>
#include <Common/Arena.h>

View File

@ -5,8 +5,8 @@
#include <IO/WriteBufferFromFileBase.h>
#include <IO/WriteBuffer.h>
#include <IO/BufferWithOwnMemory.h>
#include <Core/Defines.h>
#include <IO/AIO.h>
#include <Core/Defines.h>
#include <Common/CurrentMetrics.h>
#include <string>

View File

@ -4,10 +4,10 @@
#include <Common/Exception.h>
#include <Common/ProfileEvents.h>
#include <Common/CurrentMetrics.h>
#include <Common/Stopwatch.h>
#include <IO/WriteBufferFromFileDescriptor.h>
#include <IO/WriteHelpers.h>
#include <Common/Stopwatch.h>
namespace ProfileEvents

View File

@ -1,10 +1,13 @@
#include <IO/WriteBufferFromHDFS.h>
#include <Common/config.h>
#if USE_HDFS
#include <Poco/URI.h>
#include <IO/WriteBufferFromHDFS.h>
#include <IO/HDFSCommon.h>
#include <hdfs/hdfs.h>
namespace DB
{

View File

@ -1,13 +1,13 @@
#include <IO/WriteBufferFromHTTPServerResponse.h>
#include <Poco/Version.h>
#include <Poco/Net/HTTPServerResponse.h>
#include <Common/Exception.h>
#include <IO/WriteBufferFromHTTPServerResponse.h>
#include <IO/WriteBufferFromString.h>
#include <IO/HTTPCommon.h>
#include <IO/Progress.h>
#include <Common/Exception.h>
#include <Common/NetException.h>
#include <Common/Stopwatch.h>
#include <IO/Progress.h>
namespace DB
{

View File

@ -10,9 +10,9 @@
#include <IO/WriteBufferFromOStream.h>
#include <IO/ZlibDeflatingWriteBuffer.h>
#include <IO/HTTPCommon.h>
#include <IO/Progress.h>
#include <Common/NetException.h>
#include <Common/Stopwatch.h>
#include <IO/Progress.h>
namespace Poco

View File

@ -1,8 +1,8 @@
#include <Poco/Net/NetException.h>
#include <Common/Exception.h>
#include <IO/WriteBufferFromPocoSocket.h>
#include <Common/Exception.h>
#include <Common/NetException.h>
#include <Common/Stopwatch.h>

View File

@ -10,20 +10,22 @@
#include <common/LocalDate.h>
#include <common/LocalDateTime.h>
#include <common/find_symbols.h>
#include <Common/intExp.h>
#include <common/StringRef.h>
#include <Core/Types.h>
#include <Core/UUID.h>
#include <Common/Exception.h>
#include <Common/StringUtils/StringUtils.h>
#include <Common/UInt128.h>
#include <common/StringRef.h>
#include <Common/intExp.h>
#include <IO/WriteBuffer.h>
#include <IO/WriteIntText.h>
#include <IO/VarInt.h>
#include <IO/DoubleConverter.h>
#include <IO/WriteBufferFromString.h>
#include <Formats/FormatSettings.h>

View File

@ -3,8 +3,8 @@
#include <IO/ReadBufferFromFileDescriptor.h>
#include <IO/WriteBufferFromFileDescriptor.h>
#include <IO/AsynchronousWriteBuffer.h>
#include <Compression/CompressedWriteBuffer.h>
#include <IO/copyData.h>
#include <Compression/CompressedWriteBuffer.h>
int main(int, char **)

View File

@ -8,9 +8,9 @@
#include <IO/WriteIntText.h>
#include <IO/WriteBufferFromVector.h>
#include <IO/WriteBufferFromString.h>
#include <IO/AsynchronousWriteBuffer.h>
#include <Compression/CompressedWriteBuffer.h>
#include <Compression/CompressedReadBuffer.h>
#include <IO/AsynchronousWriteBuffer.h>
#include <Common/Stopwatch.h>

View File

@ -5,7 +5,6 @@
#include <Poco/Mutex.h>
#include <Poco/UUID.h>
#include <Poco/Net/IPAddress.h>
#include <common/logger_useful.h>
#include <pcg_random.hpp>
#include <Common/Macros.h>
#include <Common/escapeForFileName.h>

View File

@ -45,12 +45,9 @@
#include <Common/typeid_cast.h>
#include <Common/StringUtils/StringUtils.h>
#include <Parsers/formatAST.h>
#include <ext/range.h>
#include <DataTypes/DataTypeFactory.h>
#include <Functions/FunctionsMiscellaneous.h>
#include <Parsers/queryToString.h>
#include <Parsers/ExpressionListParsers.h>
#include <Parsers/parseQuery.h>
#include <Parsers/queryToString.h>

View File

@ -8,7 +8,6 @@
#include <unordered_map>
#include <shared_mutex>
#include <Poco/Condition.h>
#include <Common/Stopwatch.h>
#include <Core/Defines.h>
#include <IO/Progress.h>
#include <Common/Stopwatch.h>

View File

@ -20,7 +20,6 @@
#include <Common/setThreadName.h>
#include <Common/ThreadPool.h>
#include <IO/WriteHelpers.h>
#include <common/logger_useful.h>
#include <Poco/Util/AbstractConfiguration.h>

View File

@ -1,11 +1,10 @@
#include <Common/FieldVisitors.h>
#include <Common/typeid_cast.h>
#include <Parsers/ASTSetQuery.h>
#include <Parsers/ASTFunction.h>
#include <Parsers/ASTAsterisk.h>
#include <Parsers/ASTIdentifier.h>
#include <Parsers/ASTSelectQuery.h>
#include <Parsers/ASTTablesInSelectQuery.h>
#include <Common/typeid_cast.h>
namespace DB

View File

@ -1,4 +1,3 @@
#include <Common/typeid_cast.h>
#include <Parsers/IAST.h>
#include <Parsers/ASTExpressionList.h>
#include <Parsers/ASTFunction.h>
@ -7,6 +6,7 @@
#include <Parsers/ExpressionListParsers.h>
#include <Parsers/ParserCreateQuery.h>
#include <Common/typeid_cast.h>
#include <Common/StringUtils/StringUtils.h>

View File

@ -1,6 +1,4 @@
#include <Parsers/ParserUseQuery.h>
#include <Common/typeid_cast.h>
#include <Parsers/ASTIdentifier.h>
#include <Parsers/ExpressionElementParsers.h>
#include <Parsers/CommonParsers.h>

View File

@ -3,7 +3,6 @@
#include <Parsers/ParserQueryWithOutput.h>
#include <Parsers/parseQuery.h>
#include <Parsers/formatAST.h>
#include <Parsers/parseQuery.h>
int main(int, char **)

View File

@ -4,8 +4,6 @@
#include <Core/NamesAndTypes.h>
#include <Storages/ColumnsDescription.h>
#include <Storages/IndicesDescription.h>
#include <optional>
namespace DB

View File

@ -1,6 +1,5 @@
#pragma once
#include <Core/Names.h>
#include <Common/Exception.h>
#include <Common/RWLock.h>
#include <Core/Names.h>

View File

@ -3,7 +3,6 @@
#include <IO/WriteBufferFromOStream.h>
#include <Storages/StorageLog.h>
#include <Formats/FormatFactory.h>
#include <Interpreters/Context.h>
#include <DataStreams/LimitBlockInputStream.h>
#include <DataStreams/IBlockOutputStream.h>
#include <DataStreams/copyData.h>

View File

@ -9,11 +9,11 @@
#include <Interpreters/Context.h>
#include <Interpreters/evaluateConstantExpression.h>
#include <boost/algorithm/string.hpp>
#include <Common/Exception.h>
#include <Common/typeid_cast.h>
namespace DB
{
namespace ErrorCodes
{
extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH;
@ -66,4 +66,5 @@ StoragePtr ITableFunctionFileLike::executeImpl(const ASTPtr & ast_function, cons
return storage;
}
}

View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
ROOT_PATH=$(git rev-parse --show-toplevel)
# Find duplicate include directives
find $ROOT_PATH/dbms -name '*.h' -or -name '*.cpp' | while read file; do grep -P '^#include ' $file | sort | uniq -c | grep -v -P '^\s+1\s' && echo $file; done

View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
ROOT_PATH=$(git rev-parse --show-toplevel)
# Find files with includes not grouped together by first component of path
find $ROOT_PATH/dbms -name '*.h' -or -name '*.cpp' | while read file; do
[[ $(grep -oP '^#include <\w+' $file | uniq -c | wc -l) > $(grep -oP '^#include <\w+' $file | sort | uniq -c | wc -l) ]] && echo $file && grep -oP '^#include <\w+' $file | uniq -c;
done