mirror changes in code and comment

This commit is contained in:
feng lv 2021-01-22 09:13:22 +00:00
parent 2094eae23d
commit beb0fec8bb
5 changed files with 20 additions and 20 deletions

View File

@ -2316,7 +2316,7 @@ void Aggregator::destroyAllAggregateStates(AggregatedDataVariants & result)
}
void Aggregator::setCancellationHook(const CancellationHook cancellation_hook)
void Aggregator::setCancellationHook(const CancellationHook & cancellation_hook)
{
isCancelled = cancellation_hook;
}

View File

@ -134,7 +134,7 @@ struct AggregationDataWithNullKeyTwoLevel : public Base
{
using Base::impls;
AggregationDataWithNullKeyTwoLevel() {}
AggregationDataWithNullKeyTwoLevel() = default;
template <typename Other>
explicit AggregationDataWithNullKeyTwoLevel(const Other & other) : Base(other)
@ -184,7 +184,7 @@ struct AggregationMethodOneNumber
Data data;
AggregationMethodOneNumber() {}
AggregationMethodOneNumber() = default;
template <typename Other>
AggregationMethodOneNumber(const Other & other) : data(other.data) {}
@ -199,8 +199,8 @@ struct AggregationMethodOneNumber
// Insert the key from the hash table into columns.
static void insertKeyIntoColumns(const Key & key, MutableColumns & key_columns, const Sizes & /*key_sizes*/)
{
auto key_holder = reinterpret_cast<const char *>(&key);
auto column = static_cast<ColumnVectorHelper *>(key_columns[0].get());
const auto * key_holder = reinterpret_cast<const char *>(&key);
auto * column = static_cast<ColumnVectorHelper *>(key_columns[0].get());
column->insertRawData<sizeof(FieldType)>(key_holder);
}
};
@ -216,7 +216,7 @@ struct AggregationMethodString
Data data;
AggregationMethodString() {}
AggregationMethodString() = default;
template <typename Other>
AggregationMethodString(const Other & other) : data(other.data) {}
@ -242,7 +242,7 @@ struct AggregationMethodStringNoCache
Data data;
AggregationMethodStringNoCache() {}
AggregationMethodStringNoCache() = default;
template <typename Other>
AggregationMethodStringNoCache(const Other & other) : data(other.data) {}
@ -268,7 +268,7 @@ struct AggregationMethodFixedString
Data data;
AggregationMethodFixedString() {}
AggregationMethodFixedString() = default;
template <typename Other>
AggregationMethodFixedString(const Other & other) : data(other.data) {}
@ -293,7 +293,7 @@ struct AggregationMethodFixedStringNoCache
Data data;
AggregationMethodFixedStringNoCache() {}
AggregationMethodFixedStringNoCache() = default;
template <typename Other>
AggregationMethodFixedStringNoCache(const Other & other) : data(other.data) {}
@ -334,7 +334,7 @@ struct AggregationMethodSingleLowCardinalityColumn : public SingleColumnMethod
static void insertKeyIntoColumns(const Key & key,
MutableColumns & key_columns_low_cardinality, const Sizes & /*key_sizes*/)
{
auto col = assert_cast<ColumnLowCardinality *>(key_columns_low_cardinality[0].get());
auto * col = assert_cast<ColumnLowCardinality *>(key_columns_low_cardinality[0].get());
if constexpr (std::is_same_v<Key, StringRef>)
{
@ -360,7 +360,7 @@ struct AggregationMethodKeysFixed
Data data;
AggregationMethodKeysFixed() {}
AggregationMethodKeysFixed() = default;
template <typename Other>
AggregationMethodKeysFixed(const Other & other) : data(other.data) {}
@ -438,7 +438,7 @@ struct AggregationMethodSerialized
Data data;
AggregationMethodSerialized() {}
AggregationMethodSerialized() = default;
template <typename Other>
AggregationMethodSerialized(const Other & other) : data(other.data) {}
@ -449,7 +449,7 @@ struct AggregationMethodSerialized
static void insertKeyIntoColumns(const StringRef & key, MutableColumns & key_columns, const Sizes &)
{
auto pos = key.data;
const auto * pos = key.data;
for (auto & column : key_columns)
pos = column->deserializeAndInsertFromArena(pos);
}
@ -783,9 +783,9 @@ struct AggregatedDataVariants : private boost::noncopyable
M(low_cardinality_keys128_two_level) \
M(low_cardinality_keys256_two_level) \
M(low_cardinality_key_string_two_level) \
M(low_cardinality_key_fixed_string_two_level) \
M(low_cardinality_key_fixed_string_two_level)
bool isLowCardinality()
bool isLowCardinality() const
{
switch (type)
{
@ -972,7 +972,7 @@ public:
/** Set a function that checks whether the current task can be aborted.
*/
void setCancellationHook(const CancellationHook cancellation_hook);
void setCancellationHook(const CancellationHook & cancellation_hook);
/// For external aggregation.
void writeToTemporaryFile(AggregatedDataVariants & data_variants, const String & tmp_path);

View File

@ -67,7 +67,7 @@ ExpressionActionsPtr ExpressionActions::clone() const
void ExpressionActions::linearizeActions()
{
/// This function does the topological sort or DAG and fills all the fields of ExpressionActions.
/// This function does the topological sort on DAG and fills all the fields of ExpressionActions.
/// Algorithm traverses DAG starting from nodes without children.
/// For every node we support the number of created children, and if all children are created, put node into queue.
struct Data

View File

@ -491,7 +491,7 @@ void PipelineExecutor::executeStepImpl(size_t thread_num, size_t num_threads, st
while (!finished && !yield)
{
/// First, find any processor to execute.
/// Just travers graph and prepare any processor.
/// Just traverse graph and prepare any processor.
while (!finished && node == nullptr)
{
{

View File

@ -249,7 +249,7 @@ public:
UInt64 getInputPortNumber(const InputPort * input_port) const
{
UInt64 number = 0;
for (auto & port : inputs)
for (const auto & port : inputs)
{
if (&port == input_port)
return number;
@ -263,7 +263,7 @@ public:
UInt64 getOutputPortNumber(const OutputPort * output_port) const
{
UInt64 number = 0;
for (auto & port : outputs)
for (const auto & port : outputs)
{
if (&port == output_port)
return number;