Merge pull request #38144 from kitaisreal/sort-description-compile-fix-typo

SortDescription compile fix typo
This commit is contained in:
Maksim Kita 2022-06-16 20:16:14 +02:00 committed by GitHub
commit f8f6a95547
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -82,7 +82,7 @@ static Poco::Logger * getLogger()
return &logger; return &logger;
} }
void compileSortDescriptionIfNeeded(SortDescription & description, const DataTypes & sort_description_types, bool increase_compile_attemps) void compileSortDescriptionIfNeeded(SortDescription & description, const DataTypes & sort_description_types, bool increase_compile_attempts)
{ {
static std::unordered_map<UInt128, UInt64, UInt128Hash> counter; static std::unordered_map<UInt128, UInt64, UInt128Hash> counter;
static std::mutex mutex; static std::mutex mutex;
@ -109,7 +109,7 @@ void compileSortDescriptionIfNeeded(SortDescription & description, const DataTyp
UInt64 & current_counter = counter[sort_description_hash_key]; UInt64 & current_counter = counter[sort_description_hash_key];
if (current_counter < description.min_count_to_compile_sort_description) if (current_counter < description.min_count_to_compile_sort_description)
{ {
current_counter += static_cast<UInt64>(increase_compile_attemps); current_counter += static_cast<UInt64>(increase_compile_attempts);
return; return;
} }
} }
@ -142,11 +142,11 @@ void compileSortDescriptionIfNeeded(SortDescription & description, const DataTyp
#else #else
void compileSortDescriptionIfNeeded(SortDescription & description, const DataTypes & sort_description_types, bool increase_compile_attemps) void compileSortDescriptionIfNeeded(SortDescription & description, const DataTypes & sort_description_types, bool increase_compile_attempts)
{ {
(void)(description); (void)(description);
(void)(sort_description_types); (void)(sort_description_types);
(void)(increase_compile_attemps); (void)(increase_compile_attempts);
} }
#endif #endif

View File

@ -107,7 +107,7 @@ public:
/** Compile sort description for header_types. /** Compile sort description for header_types.
* Description is compiled only if compilation attempts to compile identical description is more than min_count_to_compile_sort_description. * Description is compiled only if compilation attempts to compile identical description is more than min_count_to_compile_sort_description.
*/ */
void compileSortDescriptionIfNeeded(SortDescription & description, const DataTypes & sort_description_types, bool increase_compile_attemps); void compileSortDescriptionIfNeeded(SortDescription & description, const DataTypes & sort_description_types, bool increase_compile_attempts);
/// Outputs user-readable description into `out`. /// Outputs user-readable description into `out`.
void dumpSortDescription(const SortDescription & description, WriteBuffer & out); void dumpSortDescription(const SortDescription & description, WriteBuffer & out);

View File

@ -40,7 +40,7 @@ MergingSortedAlgorithm::MergingSortedAlgorithm(
queue_variants = SortQueueVariants(sort_description_types, description); queue_variants = SortQueueVariants(sort_description_types, description);
if (queue_variants.variantSupportJITCompilation()) if (queue_variants.variantSupportJITCompilation())
compileSortDescriptionIfNeeded(description, sort_description_types, true /*increase_compile_attemps*/); compileSortDescriptionIfNeeded(description, sort_description_types, true /*increase_compile_attempts*/);
} }
void MergingSortedAlgorithm::addInput() void MergingSortedAlgorithm::addInput()

View File

@ -175,7 +175,7 @@ SortingTransform::SortingTransform(
description.swap(description_without_constants); description.swap(description_without_constants);
if (SortQueueVariants(sort_description_types, description).variantSupportJITCompilation()) if (SortQueueVariants(sort_description_types, description).variantSupportJITCompilation())
compileSortDescriptionIfNeeded(description, sort_description_types, increase_sort_description_compile_attempts /*increase_compile_attemps*/); compileSortDescriptionIfNeeded(description, sort_description_types, increase_sort_description_compile_attempts /*increase_compile_attempts*/);
} }
SortingTransform::~SortingTransform() = default; SortingTransform::~SortingTransform() = default;