mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
mirror changes in code and comment
This commit is contained in:
parent
2094eae23d
commit
beb0fec8bb
@ -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;
|
isCancelled = cancellation_hook;
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ struct AggregationDataWithNullKeyTwoLevel : public Base
|
|||||||
{
|
{
|
||||||
using Base::impls;
|
using Base::impls;
|
||||||
|
|
||||||
AggregationDataWithNullKeyTwoLevel() {}
|
AggregationDataWithNullKeyTwoLevel() = default;
|
||||||
|
|
||||||
template <typename Other>
|
template <typename Other>
|
||||||
explicit AggregationDataWithNullKeyTwoLevel(const Other & other) : Base(other)
|
explicit AggregationDataWithNullKeyTwoLevel(const Other & other) : Base(other)
|
||||||
@ -184,7 +184,7 @@ struct AggregationMethodOneNumber
|
|||||||
|
|
||||||
Data data;
|
Data data;
|
||||||
|
|
||||||
AggregationMethodOneNumber() {}
|
AggregationMethodOneNumber() = default;
|
||||||
|
|
||||||
template <typename Other>
|
template <typename Other>
|
||||||
AggregationMethodOneNumber(const Other & other) : data(other.data) {}
|
AggregationMethodOneNumber(const Other & other) : data(other.data) {}
|
||||||
@ -199,8 +199,8 @@ struct AggregationMethodOneNumber
|
|||||||
// Insert the key from the hash table into columns.
|
// Insert the key from the hash table into columns.
|
||||||
static void insertKeyIntoColumns(const Key & key, MutableColumns & key_columns, const Sizes & /*key_sizes*/)
|
static void insertKeyIntoColumns(const Key & key, MutableColumns & key_columns, const Sizes & /*key_sizes*/)
|
||||||
{
|
{
|
||||||
auto key_holder = reinterpret_cast<const char *>(&key);
|
const auto * key_holder = reinterpret_cast<const char *>(&key);
|
||||||
auto column = static_cast<ColumnVectorHelper *>(key_columns[0].get());
|
auto * column = static_cast<ColumnVectorHelper *>(key_columns[0].get());
|
||||||
column->insertRawData<sizeof(FieldType)>(key_holder);
|
column->insertRawData<sizeof(FieldType)>(key_holder);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -216,7 +216,7 @@ struct AggregationMethodString
|
|||||||
|
|
||||||
Data data;
|
Data data;
|
||||||
|
|
||||||
AggregationMethodString() {}
|
AggregationMethodString() = default;
|
||||||
|
|
||||||
template <typename Other>
|
template <typename Other>
|
||||||
AggregationMethodString(const Other & other) : data(other.data) {}
|
AggregationMethodString(const Other & other) : data(other.data) {}
|
||||||
@ -242,7 +242,7 @@ struct AggregationMethodStringNoCache
|
|||||||
|
|
||||||
Data data;
|
Data data;
|
||||||
|
|
||||||
AggregationMethodStringNoCache() {}
|
AggregationMethodStringNoCache() = default;
|
||||||
|
|
||||||
template <typename Other>
|
template <typename Other>
|
||||||
AggregationMethodStringNoCache(const Other & other) : data(other.data) {}
|
AggregationMethodStringNoCache(const Other & other) : data(other.data) {}
|
||||||
@ -268,7 +268,7 @@ struct AggregationMethodFixedString
|
|||||||
|
|
||||||
Data data;
|
Data data;
|
||||||
|
|
||||||
AggregationMethodFixedString() {}
|
AggregationMethodFixedString() = default;
|
||||||
|
|
||||||
template <typename Other>
|
template <typename Other>
|
||||||
AggregationMethodFixedString(const Other & other) : data(other.data) {}
|
AggregationMethodFixedString(const Other & other) : data(other.data) {}
|
||||||
@ -293,7 +293,7 @@ struct AggregationMethodFixedStringNoCache
|
|||||||
|
|
||||||
Data data;
|
Data data;
|
||||||
|
|
||||||
AggregationMethodFixedStringNoCache() {}
|
AggregationMethodFixedStringNoCache() = default;
|
||||||
|
|
||||||
template <typename Other>
|
template <typename Other>
|
||||||
AggregationMethodFixedStringNoCache(const Other & other) : data(other.data) {}
|
AggregationMethodFixedStringNoCache(const Other & other) : data(other.data) {}
|
||||||
@ -334,7 +334,7 @@ struct AggregationMethodSingleLowCardinalityColumn : public SingleColumnMethod
|
|||||||
static void insertKeyIntoColumns(const Key & key,
|
static void insertKeyIntoColumns(const Key & key,
|
||||||
MutableColumns & key_columns_low_cardinality, const Sizes & /*key_sizes*/)
|
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>)
|
if constexpr (std::is_same_v<Key, StringRef>)
|
||||||
{
|
{
|
||||||
@ -360,7 +360,7 @@ struct AggregationMethodKeysFixed
|
|||||||
|
|
||||||
Data data;
|
Data data;
|
||||||
|
|
||||||
AggregationMethodKeysFixed() {}
|
AggregationMethodKeysFixed() = default;
|
||||||
|
|
||||||
template <typename Other>
|
template <typename Other>
|
||||||
AggregationMethodKeysFixed(const Other & other) : data(other.data) {}
|
AggregationMethodKeysFixed(const Other & other) : data(other.data) {}
|
||||||
@ -438,7 +438,7 @@ struct AggregationMethodSerialized
|
|||||||
|
|
||||||
Data data;
|
Data data;
|
||||||
|
|
||||||
AggregationMethodSerialized() {}
|
AggregationMethodSerialized() = default;
|
||||||
|
|
||||||
template <typename Other>
|
template <typename Other>
|
||||||
AggregationMethodSerialized(const Other & other) : data(other.data) {}
|
AggregationMethodSerialized(const Other & other) : data(other.data) {}
|
||||||
@ -449,7 +449,7 @@ struct AggregationMethodSerialized
|
|||||||
|
|
||||||
static void insertKeyIntoColumns(const StringRef & key, MutableColumns & key_columns, const Sizes &)
|
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)
|
for (auto & column : key_columns)
|
||||||
pos = column->deserializeAndInsertFromArena(pos);
|
pos = column->deserializeAndInsertFromArena(pos);
|
||||||
}
|
}
|
||||||
@ -783,9 +783,9 @@ struct AggregatedDataVariants : private boost::noncopyable
|
|||||||
M(low_cardinality_keys128_two_level) \
|
M(low_cardinality_keys128_two_level) \
|
||||||
M(low_cardinality_keys256_two_level) \
|
M(low_cardinality_keys256_two_level) \
|
||||||
M(low_cardinality_key_string_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)
|
switch (type)
|
||||||
{
|
{
|
||||||
@ -972,7 +972,7 @@ public:
|
|||||||
|
|
||||||
/** Set a function that checks whether the current task can be aborted.
|
/** 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.
|
/// For external aggregation.
|
||||||
void writeToTemporaryFile(AggregatedDataVariants & data_variants, const String & tmp_path);
|
void writeToTemporaryFile(AggregatedDataVariants & data_variants, const String & tmp_path);
|
||||||
|
@ -67,7 +67,7 @@ ExpressionActionsPtr ExpressionActions::clone() const
|
|||||||
|
|
||||||
void ExpressionActions::linearizeActions()
|
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.
|
/// 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.
|
/// For every node we support the number of created children, and if all children are created, put node into queue.
|
||||||
struct Data
|
struct Data
|
||||||
|
@ -491,7 +491,7 @@ void PipelineExecutor::executeStepImpl(size_t thread_num, size_t num_threads, st
|
|||||||
while (!finished && !yield)
|
while (!finished && !yield)
|
||||||
{
|
{
|
||||||
/// First, find any processor to execute.
|
/// First, find any processor to execute.
|
||||||
/// Just travers graph and prepare any processor.
|
/// Just traverse graph and prepare any processor.
|
||||||
while (!finished && node == nullptr)
|
while (!finished && node == nullptr)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
@ -249,7 +249,7 @@ public:
|
|||||||
UInt64 getInputPortNumber(const InputPort * input_port) const
|
UInt64 getInputPortNumber(const InputPort * input_port) const
|
||||||
{
|
{
|
||||||
UInt64 number = 0;
|
UInt64 number = 0;
|
||||||
for (auto & port : inputs)
|
for (const auto & port : inputs)
|
||||||
{
|
{
|
||||||
if (&port == input_port)
|
if (&port == input_port)
|
||||||
return number;
|
return number;
|
||||||
@ -263,7 +263,7 @@ public:
|
|||||||
UInt64 getOutputPortNumber(const OutputPort * output_port) const
|
UInt64 getOutputPortNumber(const OutputPort * output_port) const
|
||||||
{
|
{
|
||||||
UInt64 number = 0;
|
UInt64 number = 0;
|
||||||
for (auto & port : outputs)
|
for (const auto & port : outputs)
|
||||||
{
|
{
|
||||||
if (&port == output_port)
|
if (&port == output_port)
|
||||||
return number;
|
return number;
|
||||||
|
Loading…
Reference in New Issue
Block a user