Non significant changes according to clang's -Weverything, part 3 [#CLICKHOUSE-2]

This commit is contained in:
Alexey Milovidov 2018-06-03 23:39:06 +03:00
parent 1c2b024c39
commit f5adbceed2
65 changed files with 128 additions and 121 deletions

View File

@ -1,5 +1,5 @@
if (NOT MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-old-style-cast -std=c++1z")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-old-style-cast -Wno-unused-function -Wno-deprecated-declarations -std=c++1z")
endif ()
if (USE_INTERNAL_BOOST_LIBRARY)

View File

@ -14,7 +14,7 @@ namespace ErrorCodes
class AggregateFunctionCombinatorArray final : public IAggregateFunctionCombinator
{
public:
String getName() const override { return "Array"; };
String getName() const override { return "Array"; }
DataTypes transformArguments(const DataTypes & arguments) const override
{

View File

@ -13,7 +13,7 @@ namespace ErrorCodes
class AggregateFunctionCombinatorForEach final : public IAggregateFunctionCombinator
{
public:
String getName() const override { return "ForEach"; };
String getName() const override { return "ForEach"; }
DataTypes transformArguments(const DataTypes & arguments) const override
{

View File

@ -13,7 +13,7 @@ namespace ErrorCodes
class AggregateFunctionCombinatorIf final : public IAggregateFunctionCombinator
{
public:
String getName() const override { return "If"; };
String getName() const override { return "If"; }
DataTypes transformArguments(const DataTypes & arguments) const override
{

View File

@ -15,7 +15,7 @@ namespace ErrorCodes
class AggregateFunctionCombinatorMerge final : public IAggregateFunctionCombinator
{
public:
String getName() const override { return "Merge"; };
String getName() const override { return "Merge"; }
DataTypes transformArguments(const DataTypes & arguments) const override
{

View File

@ -16,7 +16,7 @@ namespace ErrorCodes
class AggregateFunctionCombinatorNull final : public IAggregateFunctionCombinator
{
public:
String getName() const override { return "Null"; };
String getName() const override { return "Null"; }
DataTypes transformArguments(const DataTypes & arguments) const override
{

View File

@ -16,7 +16,7 @@ namespace ErrorCodes
class AggregateFunctionCombinatorState final : public IAggregateFunctionCombinator
{
public:
String getName() const override { return "State"; };
String getName() const override { return "State"; }
DataTypes transformArguments(const DataTypes & arguments) const override
{

View File

@ -20,7 +20,7 @@ private:
public:
const char * getFamilyName() const override { return "Nothing"; }
MutableColumnPtr cloneDummy(size_t s) const override { return ColumnNothing::create(s); };
MutableColumnPtr cloneDummy(size_t s) const override { return ColumnNothing::create(s); }
bool canBeInsideNullable() const override { return true; }
};

View File

@ -36,7 +36,7 @@ public:
int compareAt(size_t, size_t, const IColumn &, int) const override { return 0; }
Field operator[](size_t) const override { throw Exception("Cannot get value from " + getName(), ErrorCodes::NOT_IMPLEMENTED); }
void get(size_t, Field &) const override { throw Exception("Cannot get value from " + getName(), ErrorCodes::NOT_IMPLEMENTED); };
void get(size_t, Field &) const override { throw Exception("Cannot get value from " + getName(), ErrorCodes::NOT_IMPLEMENTED); }
void insert(const Field &) override { throw Exception("Cannot insert element into " + getName(), ErrorCodes::NOT_IMPLEMENTED); }
StringRef getDataAt(size_t) const override

View File

@ -40,10 +40,10 @@ public:
std::unique_ptr<ReadBuffer> read_buffer;
Block sample_block;
virtual ~BaseExternalTable() {};
virtual ~BaseExternalTable() {}
/// Initialize read_buffer, depending on the data source. By default, does nothing.
virtual void initReadBuffer() {};
virtual void initReadBuffer() {}
/// Get the table data - a pair (a thread with the contents of the table, the name of the table)
ExternalTableData getData(const Context & context)

View File

@ -30,7 +30,7 @@ private:
bool wait_called = false;
ShellCommand(pid_t pid, int in_fd, int out_fd, int err_fd)
: pid(pid), in(in_fd), out(out_fd), err(err_fd) {};
: pid(pid), in(in_fd), out(out_fd), err(err_fd) {}
static std::unique_ptr<ShellCommand> executeImpl(const char * filename, char * const argv[], bool pipe_stdin_only);

View File

@ -175,7 +175,7 @@ public:
XID xid = 0;
bool has_watch = false;
virtual ~Request() {};
virtual ~Request() {}
virtual OpNum getOpNum() const = 0;
/// Writes length, xid, op_num, then the rest.
@ -184,7 +184,7 @@ public:
virtual ResponsePtr makeResponse() const = 0;
virtual void addRootPath(const String & /* root_path */) {};
virtual void addRootPath(const String & /* root_path */) {}
virtual String getPath() const = 0;
};
@ -230,7 +230,7 @@ public:
struct AuthResponse final : Response
{
void readImpl(ReadBuffer &) override {};
void readImpl(ReadBuffer &) override {}
};
struct CloseRequest final : Request
@ -376,7 +376,7 @@ public:
struct CheckResponse final : Response
{
void readImpl(ReadBuffer &) override {};
void readImpl(ReadBuffer &) override {}
};
struct MultiRequest final : Request

View File

@ -265,7 +265,6 @@ void IProfilingBlockInputStream::progressImpl(const Progress & value)
throw Exception("Limit for (uncompressed) bytes to read exceeded: " + toString(progress.bytes)
+ " bytes read, maximum: " + toString(limits.size_limits.max_bytes),
ErrorCodes::TOO_MANY_BYTES);
break;
}
case OverflowMode::BREAK:
@ -298,8 +297,6 @@ void IProfilingBlockInputStream::progressImpl(const Progress & value)
+ " rows/sec., minimum: " + toString(limits.min_execution_speed),
ErrorCodes::TOO_SLOW);
size_t total_rows = progress.total_rows;
/// If the predicted execution time is longer than `max_execution_time`.
if (limits.max_execution_time != 0 && total_rows)
{

View File

@ -51,7 +51,7 @@ public:
}
}
DataTypeInterval(Kind kind) : kind(kind) {};
DataTypeInterval(Kind kind) : kind(kind) {}
std::string getName() const override { return std::string("Interval") + kindToString(); }
const char * getFamilyName() const override { return "Interval"; }

View File

@ -608,12 +608,12 @@ void CacheDictionary::getItemsNumberImpl(
{
const auto attribute_value = attribute_array[cell_idx];
for (const auto row : outdated_ids[id])
for (const size_t row : outdated_ids[id])
out[row] = static_cast<OutputType>(attribute_value);
},
[&] (const auto id, const auto)
{
for (const auto row : outdated_ids[id])
for (const size_t row : outdated_ids[id])
out[row] = get_default(row);
});
}

View File

@ -50,7 +50,7 @@ public:
std::string getKeyDescription() const
{
return key_description;
};
}
std::exception_ptr getCreationException() const override
{
@ -290,7 +290,7 @@ private:
DISPATCH(Float64)
#undef DISPATCH
else throw Exception("Unexpected type of attribute: " + toString(attribute.type), ErrorCodes::LOGICAL_ERROR);
};
}
template <typename AttributeType, typename OutputType, typename DefaultGetter>
void getItemsNumberImpl(
@ -367,7 +367,7 @@ private:
for (const auto row : outdated_keys[key])
out[row] = get_default(row);
});
};
}
template <typename DefaultGetter>
void getItemsString(Attribute & attribute, const Columns & key_columns, ColumnString * out, DefaultGetter && get_default) const
@ -510,7 +510,7 @@ private:
const auto string_ref = it != std::end(map) ? it->second : get_default(row);
out->insertData(string_ref.data, string_ref.size);
}
};
}
template <typename PresentKeyHandler, typename AbsentKeyHandler>
void update(const Columns & in_key_columns,
@ -609,7 +609,7 @@ private:
const auto now = std::chrono::system_clock::now();
/// Check which ids have not been found and require setting null_value
for (const auto key_found_pair : remaining_keys)
for (const auto & key_found_pair : remaining_keys)
{
if (key_found_pair.second)
{
@ -660,7 +660,7 @@ private:
ProfileEvents::increment(ProfileEvents::DictCacheKeysRequestedMiss, found_num);
ProfileEvents::increment(ProfileEvents::DictCacheKeysRequestedMiss, not_found_num);
};
}
UInt64 getCellIdx(const StringRef key) const;
@ -698,7 +698,7 @@ private:
{
const auto hash = StringRefHash{}(key);
return findCellIdx(key, now, hash);
};
}
bool isEmptyCell(const UInt64 idx) const;
@ -738,4 +738,5 @@ private:
const std::chrono::time_point<std::chrono::system_clock> creation_time = std::chrono::system_clock::now();
};
}

View File

@ -592,18 +592,18 @@ std::vector<StringRef> ComplexKeyHashedDictionary::getKeys() const
switch (attribute.type)
{
case AttributeUnderlyingType::UInt8: return getKeys<UInt8>(attribute); break;
case AttributeUnderlyingType::UInt16: return getKeys<UInt16>(attribute); break;
case AttributeUnderlyingType::UInt32: return getKeys<UInt32>(attribute); break;
case AttributeUnderlyingType::UInt64: return getKeys<UInt64>(attribute); break;
case AttributeUnderlyingType::UInt128: return getKeys<UInt128>(attribute); break;
case AttributeUnderlyingType::Int8: return getKeys<Int8>(attribute); break;
case AttributeUnderlyingType::Int16: return getKeys<Int16>(attribute); break;
case AttributeUnderlyingType::Int32: return getKeys<Int32>(attribute); break;
case AttributeUnderlyingType::Int64: return getKeys<Int64>(attribute); break;
case AttributeUnderlyingType::Float32: return getKeys<Float32>(attribute); break;
case AttributeUnderlyingType::Float64: return getKeys<Float64>(attribute); break;
case AttributeUnderlyingType::String: return getKeys<StringRef>(attribute); break;
case AttributeUnderlyingType::UInt8: return getKeys<UInt8>(attribute);
case AttributeUnderlyingType::UInt16: return getKeys<UInt16>(attribute);
case AttributeUnderlyingType::UInt32: return getKeys<UInt32>(attribute);
case AttributeUnderlyingType::UInt64: return getKeys<UInt64>(attribute);
case AttributeUnderlyingType::UInt128: return getKeys<UInt128>(attribute);
case AttributeUnderlyingType::Int8: return getKeys<Int8>(attribute);
case AttributeUnderlyingType::Int16: return getKeys<Int16>(attribute);
case AttributeUnderlyingType::Int32: return getKeys<Int32>(attribute);
case AttributeUnderlyingType::Int64: return getKeys<Int64>(attribute);
case AttributeUnderlyingType::Float32: return getKeys<Float32>(attribute);
case AttributeUnderlyingType::Float64: return getKeys<Float64>(attribute);
case AttributeUnderlyingType::String: return getKeys<StringRef>(attribute);
}
return {};
}

View File

@ -27,7 +27,7 @@ public:
ComplexKeyHashedDictionary(const ComplexKeyHashedDictionary & other);
std::string getKeyDescription() const { return key_description; };
std::string getKeyDescription() const { return key_description; }
std::exception_ptr getCreationException() const override { return creation_exception; }

View File

@ -138,7 +138,7 @@ public:
}
}
Block getHeader() const override { return stream->getHeader(); };
Block getHeader() const override { return stream->getHeader(); }
private:
Block readImpl() override { return stream->read(); }

View File

@ -566,18 +566,18 @@ PaddedPODArray<HashedDictionary::Key> HashedDictionary::getIds() const
switch (attribute.type)
{
case AttributeUnderlyingType::UInt8: return getIds<UInt8>(attribute); break;
case AttributeUnderlyingType::UInt16: return getIds<UInt16>(attribute); break;
case AttributeUnderlyingType::UInt32: return getIds<UInt32>(attribute); break;
case AttributeUnderlyingType::UInt64: return getIds<UInt64>(attribute); break;
case AttributeUnderlyingType::UInt128: return getIds<UInt128>(attribute); break;
case AttributeUnderlyingType::Int8: return getIds<Int8>(attribute); break;
case AttributeUnderlyingType::Int16: return getIds<Int16>(attribute); break;
case AttributeUnderlyingType::Int32: return getIds<Int32>(attribute); break;
case AttributeUnderlyingType::Int64: return getIds<Int64>(attribute); break;
case AttributeUnderlyingType::Float32: return getIds<Float32>(attribute); break;
case AttributeUnderlyingType::Float64: return getIds<Float64>(attribute); break;
case AttributeUnderlyingType::String: return getIds<StringRef>(attribute); break;
case AttributeUnderlyingType::UInt8: return getIds<UInt8>(attribute);
case AttributeUnderlyingType::UInt16: return getIds<UInt16>(attribute);
case AttributeUnderlyingType::UInt32: return getIds<UInt32>(attribute);
case AttributeUnderlyingType::UInt64: return getIds<UInt64>(attribute);
case AttributeUnderlyingType::UInt128: return getIds<UInt128>(attribute);
case AttributeUnderlyingType::Int8: return getIds<Int8>(attribute);
case AttributeUnderlyingType::Int16: return getIds<Int16>(attribute);
case AttributeUnderlyingType::Int32: return getIds<Int32>(attribute);
case AttributeUnderlyingType::Int64: return getIds<Int64>(attribute);
case AttributeUnderlyingType::Float32: return getIds<Float32>(attribute);
case AttributeUnderlyingType::Float64: return getIds<Float64>(attribute);
case AttributeUnderlyingType::String: return getIds<StringRef>(attribute);
}
return PaddedPODArray<Key>();
}

View File

@ -47,7 +47,7 @@ private:
namespace
{
const std::string lib_config_settings = ".settings";
constexpr auto lib_config_settings = ".settings";
CStringsHolder getLibSettings(const Poco::Util::AbstractConfiguration & config, const std::string & config_root)
@ -96,8 +96,7 @@ namespace
if (!field.data)
continue;
const auto & size = field.size;
const auto & data = static_cast<const char *>(field.data);
columns[row_n]->insertData(data, size);
columns[row_n]->insertData(static_cast<const char *>(field.data), size);
}
}

View File

@ -36,7 +36,7 @@ public:
LibraryDictionarySource(const LibraryDictionarySource & other);
~LibraryDictionarySource();
~LibraryDictionarySource() override;
BlockInputStreamPtr loadAll() override;

View File

@ -32,7 +32,7 @@ public:
String getName() const override { return "MongoDB"; }
Block getHeader() const override { return description.sample_block; };
Block getHeader() const override { return description.sample_block; }
private:
Block readImpl() override;

View File

@ -27,7 +27,7 @@ public:
String getName() const override { return "ODBC"; }
Block getHeader() const override { return description.sample_block; };
Block getHeader() const override { return description.sample_block; }
private:
Block readImpl() override;

View File

@ -28,9 +28,9 @@ public:
TrieDictionary(const TrieDictionary & other);
~TrieDictionary();
~TrieDictionary() override;
std::string getKeyDescription() const { return key_description; };
std::string getKeyDescription() const { return key_description; }
std::exception_ptr getCreationException() const override { return creation_exception; }

View File

@ -449,7 +449,7 @@ struct BitTestImpl
static inline Result apply(A a, B b)
{
return (typename NumberTraits::ToInteger<A>::Type(a) >> typename NumberTraits::ToInteger<B>::Type(b)) & 1;
};
}
#if USE_EMBEDDED_COMPILER
static constexpr bool compilable = false; /// TODO
@ -1561,13 +1561,13 @@ private:
struct BitTestAnyImpl
{
template <typename A, typename B>
static inline UInt8 apply(A a, B b) { return (a & b) != 0; };
static inline UInt8 apply(A a, B b) { return (a & b) != 0; }
};
struct BitTestAllImpl
{
template <typename A, typename B>
static inline UInt8 apply(A a, B b) { return (a & b) == b; };
static inline UInt8 apply(A a, B b) { return (a & b) == b; }
};

View File

@ -617,7 +617,7 @@ class FunctionComparison : public IFunction
{
public:
static constexpr auto name = Name::name;
static FunctionPtr create(const Context &) { return std::make_shared<FunctionComparison>(); };
static FunctionPtr create(const Context &) { return std::make_shared<FunctionComparison>(); }
private:
template <typename T0, typename T1>

View File

@ -981,7 +981,7 @@ class FunctionMultiIf final : public FunctionIfBase</*null_is_false=*/true>
public:
static constexpr auto name = "multiIf";
static FunctionPtr create(const Context & context);
FunctionMultiIf(const Context & context) : context(context) {};
FunctionMultiIf(const Context & context) : context(context) {}
public:
String getName() const override;

View File

@ -181,7 +181,7 @@ class FunctionStringHash64 : public IFunction
{
public:
static constexpr auto name = Name::name;
static FunctionPtr create(const Context &) { return std::make_shared<FunctionStringHash64>(); };
static FunctionPtr create(const Context &) { return std::make_shared<FunctionStringHash64>(); }
String getName() const override
{
@ -233,7 +233,7 @@ class FunctionStringHashFixedString : public IFunction
{
public:
static constexpr auto name = Impl::name;
static FunctionPtr create(const Context &) { return std::make_shared<FunctionStringHashFixedString>(); };
static FunctionPtr create(const Context &) { return std::make_shared<FunctionStringHashFixedString>(); }
String getName() const override
{
@ -286,7 +286,7 @@ class FunctionIntHash : public IFunction
{
public:
static constexpr auto name = Name::name;
static FunctionPtr create(const Context &) { return std::make_shared<FunctionIntHash>(); };
static FunctionPtr create(const Context &) { return std::make_shared<FunctionIntHash>(); }
private:
using ToType = typename Impl::ReturnType;
@ -375,7 +375,7 @@ class FunctionNeighbourhoodHash64 : public IFunction
{
public:
static constexpr auto name = Impl::name;
static FunctionPtr create(const Context &) { return std::make_shared<FunctionNeighbourhoodHash64>(); };
static FunctionPtr create(const Context &) { return std::make_shared<FunctionNeighbourhoodHash64>(); }
private:
template <typename FromType, bool first>

View File

@ -711,7 +711,7 @@ class FunctionArrayMapped : public IFunction
{
public:
static constexpr auto name = Name::name;
static FunctionPtr create(const Context &) { return std::make_shared<FunctionArrayMapped>(); };
static FunctionPtr create(const Context &) { return std::make_shared<FunctionArrayMapped>(); }
String getName() const override
{

View File

@ -197,7 +197,7 @@ class FunctionAnyArityLogical : public IFunction
{
public:
static constexpr auto name = Name::name;
static FunctionPtr create(const Context &) { return std::make_shared<FunctionAnyArityLogical>(); };
static FunctionPtr create(const Context &) { return std::make_shared<FunctionAnyArityLogical>(); }
private:
bool extractConstColumns(ColumnRawPtrs & in, UInt8 & res)
@ -430,7 +430,7 @@ class FunctionUnaryLogical : public IFunction
{
public:
static constexpr auto name = Name::name;
static FunctionPtr create(const Context &) { return std::make_shared<FunctionUnaryLogical>(); };
static FunctionPtr create(const Context &) { return std::make_shared<FunctionUnaryLogical>(); }
private:
template <typename T>

View File

@ -33,7 +33,7 @@ class FunctionReinterpretAsStringImpl : public IFunction
{
public:
static constexpr auto name = Name::name;
static FunctionPtr create(const Context &) { return std::make_shared<FunctionReinterpretAsStringImpl>(); };
static FunctionPtr create(const Context &) { return std::make_shared<FunctionReinterpretAsStringImpl>(); }
String getName() const override
{
@ -98,7 +98,7 @@ class FunctionReinterpretAsFixedStringImpl : public IFunction
{
public:
static constexpr auto name = Name::name;
static FunctionPtr create(const Context &) { return std::make_shared<FunctionReinterpretAsFixedStringImpl>(); };
static FunctionPtr create(const Context &) { return std::make_shared<FunctionReinterpretAsFixedStringImpl>(); }
String getName() const override
{
@ -153,7 +153,7 @@ class FunctionReinterpretStringAs : public IFunction
{
public:
static constexpr auto name = Name::name;
static FunctionPtr create(const Context &) { return std::make_shared<FunctionReinterpretStringAs>(); };
static FunctionPtr create(const Context &) { return std::make_shared<FunctionReinterpretStringAs>(); }
using ToFieldType = typename ToDataType::FieldType;

View File

@ -28,7 +28,7 @@ protected:
public:
WriteBufferFromPocoSocket(Poco::Net::Socket & socket_, size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE);
~WriteBufferFromPocoSocket();
~WriteBufferFromPocoSocket() override;
};
}

View File

@ -966,7 +966,7 @@ public:
return "DDLQueryStatusInputSream";
}
Block getHeader() const override { return sample; };
Block getHeader() const override { return sample; }
Block readImpl() override
{

View File

@ -117,7 +117,7 @@ public:
return "SynchronousQueryKiller";
}
Block getHeader() const override { return res_sample_block; };
Block getHeader() const override { return res_sample_block; }
Block readImpl() override
{

View File

@ -53,7 +53,7 @@ public:
const BlockInputStreamPtr & input = nullptr,
bool only_analyze = false);
~InterpreterSelectQuery();
~InterpreterSelectQuery() override;
/// Execute a query. Get the stream of blocks to read.
BlockIO execute() override;

View File

@ -1008,7 +1008,7 @@ public:
String getName() const override { return "NonJoined"; }
Block getHeader() const override { return result_sample_block; };
Block getHeader() const override { return result_sample_block; }
protected:

View File

@ -242,7 +242,7 @@ public:
/** Keep "totals" (separate part of dataset, see WITH TOTALS) to use later.
*/
void setTotals(const Block & block) { totals = block; }
bool hasTotals() const { return totals; };
bool hasTotals() const { return totals; }
void joinTotals(Block & block) const;

View File

@ -1,3 +1,6 @@
#include <Poco/Util/AbstractConfiguration.h>
#include <Core/Field.h>
#include <Interpreters/Settings.h>

View File

@ -1,15 +1,22 @@
#pragma once
#include <Poco/Util/AbstractConfiguration.h>
#include <Core/Defines.h>
#include <Core/Field.h>
#include <Interpreters/SettingsCommon.h>
namespace Poco
{
namespace Util
{
class AbstractConfiguration;
}
}
namespace DB
{
class Field;
/** Settings of query execution.
*/
struct Settings

View File

@ -1,7 +1,6 @@
#pragma once
#include <Core/Field.h>
#include <IO/WriteHelpers.h>
#include <Poco/Timespan.h>
#include <Common/getNumberOfPhysicalCPUCores.h>
@ -11,6 +10,7 @@
#include <IO/CompressedStream.h>
#include <IO/ReadHelpers.h>
#include <IO/WriteHelpers.h>
namespace DB

View File

@ -259,4 +259,4 @@ void NO_INLINE Aggregator::executeSpecializedWithoutKey(
*
* Therefore, we can work around the problem this way
*/
extern "C" void __attribute__((__visibility__("default"), __noreturn__)) __cxa_pure_virtual() { abort(); };
extern "C" void __attribute__((__visibility__("default"), __noreturn__)) __cxa_pure_virtual() { abort(); }

View File

@ -8,7 +8,7 @@ namespace DB
struct ASTCheckQuery : public ASTQueryWithOutput
{
/** Get the text that identifies this element. */
String getID() const override { return ("CheckQuery_" + database + "_" + table); };
String getID() const override { return ("CheckQuery_" + database + "_" + table); }
ASTPtr clone() const override
{

View File

@ -94,7 +94,7 @@ public:
ASTSelectWithUnionQuery * select = nullptr;
/** Get the text that identifies this element. */
String getID() const override { return (attach ? "AttachQuery_" : "CreateQuery_") + database + "_" + table; };
String getID() const override { return (attach ? "AttachQuery_" : "CreateQuery_") + database + "_" + table; }
ASTPtr clone() const override
{

View File

@ -20,7 +20,7 @@ public:
String table;
/** Get the text that identifies this element. */
String getID() const override { return (detach ? "DetachQuery_" : "DropQuery_") + database + "_" + table; };
String getID() const override { return (detach ? "DetachQuery_" : "DropQuery_") + database + "_" + table; }
ASTPtr clone() const override
{

View File

@ -27,7 +27,7 @@ public:
const char * end = nullptr;
/** Get the text that identifies this element. */
String getID() const override { return "InsertQuery_" + database + "_" + table; };
String getID() const override { return "InsertQuery_" + database + "_" + table; }
ASTPtr clone() const override
{

View File

@ -23,7 +23,7 @@ public:
bool deduplicate;
/** Get the text that identifies this element. */
String getID() const override { return "OptimizeQuery_" + database + "_" + table + (final ? "_final" : "") + (deduplicate ? "_deduplicate" : ""); };
String getID() const override { return "OptimizeQuery_" + database + "_" + table + (final ? "_final" : "") + (deduplicate ? "_deduplicate" : ""); }
ASTPtr clone() const override
{

View File

@ -34,7 +34,7 @@ template <typename ASTIDAndQueryNames>
class ASTQueryWithOutputImpl : public ASTQueryWithOutput
{
public:
String getID() const override { return ASTIDAndQueryNames::ID; };
String getID() const override { return ASTIDAndQueryNames::ID; }
ASTPtr clone() const override
{

View File

@ -30,7 +30,7 @@ template <typename AstIDAndQueryNames>
class ASTQueryWithTableAndOutputImpl : public ASTQueryWithTableAndOutput
{
public:
String getID() const override { return AstIDAndQueryNames::ID + ("_" + database) + "_" + table; };
String getID() const override { return AstIDAndQueryNames::ID + ("_" + database) + "_" + table; }
ASTPtr clone() const override
{

View File

@ -29,7 +29,7 @@ public:
Elements elements;
/** Get the text that identifies this element. */
String getID() const override { return "Rename"; };
String getID() const override { return "Rename"; }
ASTPtr clone() const override
{

View File

@ -26,7 +26,7 @@ public:
Changes changes;
/** Get the text that identifies this element. */
String getID() const override { return "Set"; };
String getID() const override { return "Set"; }
ASTPtr clone() const override { return std::make_shared<ASTSetQuery>(*this); }

View File

@ -21,7 +21,7 @@ public:
bool not_like{false};
/** Get the text that identifies this element. */
String getID() const override { return "ShowTables"; };
String getID() const override { return "ShowTables"; }
ASTPtr clone() const override
{

View File

@ -46,7 +46,7 @@ public:
String target_database;
String target_table;
String getID() const override { return "SYSTEM query"; };
String getID() const override { return "SYSTEM query"; }
ASTPtr clone() const override { return std::make_shared<ASTSystemQuery>(*this); }

View File

@ -15,7 +15,7 @@ public:
String database;
/** Get the text that identifies this element. */
String getID() const override { return "UseQuery_" + database; };
String getID() const override { return "UseQuery_" + database; }
ASTPtr clone() const override { return std::make_shared<ASTUseQuery>(*this); }

View File

@ -48,7 +48,7 @@ class ASTDescribeQuery : public ASTQueryWithOutput
public:
ASTPtr table_expression;
String getID() const override { return "DescribeQuery"; };
String getID() const override { return "DescribeQuery"; }
ASTPtr clone() const override
{

View File

@ -794,7 +794,7 @@ public:
}
std::rethrow_exception(exception);
};
}
void discoverShardPartitions(const TaskShardPtr & task_shard)

View File

@ -63,7 +63,7 @@ private:
size_t padding;
public:
explicit JSONString(size_t padding_ = 1) : padding(padding_){};
explicit JSONString(size_t padding_ = 1) : padding(padding_) {}
void set(const String key, String value, bool wrap = true)
{
@ -231,13 +231,13 @@ public:
conditions_any_of.report(value, conditions_any_of.CONDITION); \
}
DEFINE_REPORT_FUNC(reportTotalTime, total_time_ms);
DEFINE_REPORT_FUNC(reportRowsRead, rows_read);
DEFINE_REPORT_FUNC(reportBytesReadUncompressed, bytes_read_uncompressed);
DEFINE_REPORT_FUNC(reportIterations, iterations);
DEFINE_REPORT_FUNC(reportMinTimeNotChangingFor, min_time_not_changing_for_ms);
DEFINE_REPORT_FUNC(reportMaxSpeedNotChangingFor, max_speed_not_changing_for_ms);
DEFINE_REPORT_FUNC(reportAverageSpeedNotChangingFor, average_speed_not_changing_for_ms);
DEFINE_REPORT_FUNC(reportTotalTime, total_time_ms)
DEFINE_REPORT_FUNC(reportRowsRead, rows_read)
DEFINE_REPORT_FUNC(reportBytesReadUncompressed, bytes_read_uncompressed)
DEFINE_REPORT_FUNC(reportIterations, iterations)
DEFINE_REPORT_FUNC(reportMinTimeNotChangingFor, min_time_not_changing_for_ms)
DEFINE_REPORT_FUNC(reportMaxSpeedNotChangingFor, max_speed_not_changing_for_ms)
DEFINE_REPORT_FUNC(reportAverageSpeedNotChangingFor, average_speed_not_changing_for_ms)
#undef REPORT

View File

@ -118,7 +118,7 @@ public:
String partition_id;
};
STRONG_TYPEDEF(String, PartitionID);
STRONG_TYPEDEF(String, PartitionID)
struct LessDataPart
{
@ -608,7 +608,7 @@ private:
static DataPartStateAndInfo dataPartPtrToStateAndInfo(const DataPartPtr & part)
{
return {part->state, part->info};
};
}
using DataPartsIndexes = boost::multi_index_container<DataPartPtr,
boost::multi_index::indexed_by<

View File

@ -478,7 +478,7 @@ public:
merge_entry->bytes_read_uncompressed += value.bytes;
merge_entry->rows_read += value.rows;
merge_entry->progress.store(average_elem_progress * merge_entry->rows_read, std::memory_order_relaxed);
};
}
};
/** Progress callback for gathering step of Vertical merge.
@ -509,7 +509,7 @@ public:
/// NOTE: 'progress' is modified by single thread, but it may be concurrently read from MergeListElement::getInfo() (StorageSystemMerges).
merge_entry->progress.store(initial_progress + local_progress, std::memory_order_relaxed);
};
}
};

View File

@ -72,7 +72,7 @@ public:
String getName() const override { return "Buffer"; }
Block getHeader() const override { return storage.getSampleBlockForColumns(column_names); };
Block getHeader() const override { return storage.getSampleBlockForColumns(column_names); }
protected:
Block readImpl() override

View File

@ -54,7 +54,7 @@ public:
reader->readSuffix();
}
Block getHeader() const override { return sample_block; };
Block getHeader() const override { return sample_block; }
private:
Block sample_block;

View File

@ -53,7 +53,7 @@ private:
{"Weight", DatasetColumnType::Weight},
{"Baseline", DatasetColumnType::Baseline},
};
};
}
std::string getColumnTypesString(const ColumnTypesMap & columnTypesMap);

View File

@ -166,7 +166,7 @@ public:
return reader->read();
}
Block getHeader() const override { return reader->getHeader(); };
Block getHeader() const override { return reader->getHeader(); }
void readPrefixImpl() override
{

View File

@ -17,7 +17,7 @@ class StorageMaterializedView : public ext::shared_ptr_helper<StorageMaterialize
public:
std::string getName() const override { return "MaterializedView"; }
std::string getTableName() const override { return table_name; }
ASTPtr getInnerQuery() const { return inner_query->clone(); };
ASTPtr getInnerQuery() const { return inner_query->clone(); }
NameAndTypePair getColumn(const String & column_name) const override;
bool hasColumn(const String & column_name) const override;

View File

@ -29,7 +29,7 @@ struct shared_ptr_helper
*/
struct Local : T
{
Local(TArgs &&... args) : T(std::forward<TArgs>(args)...) {};
Local(TArgs &&... args) : T(std::forward<TArgs>(args)...) {}
};
return std::make_shared<Local>(std::forward<TArgs>(args)...);