mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
dbms: fix error with ternary operator having priority lower than binary + [#METR-17328]
This commit is contained in:
parent
ee21853933
commit
7159c57280
@ -9,6 +9,7 @@
|
|||||||
#include <DB/Common/HashTable/HashMap.h>
|
#include <DB/Common/HashTable/HashMap.h>
|
||||||
#include <DB/Columns/ColumnString.h>
|
#include <DB/Columns/ColumnString.h>
|
||||||
#include <DB/Core/StringRef.h>
|
#include <DB/Core/StringRef.h>
|
||||||
|
#include <ext/enumerate.hpp>
|
||||||
#include <ext/scope_guard.hpp>
|
#include <ext/scope_guard.hpp>
|
||||||
#include <ext/bit_cast.hpp>
|
#include <ext/bit_cast.hpp>
|
||||||
#include <ext/range.hpp>
|
#include <ext/range.hpp>
|
||||||
@ -20,7 +21,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <DB/DataStreams/NullBlockInputStream.h>
|
|
||||||
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
@ -58,7 +58,7 @@ public:
|
|||||||
|
|
||||||
std::size_t getBytesAllocated() const override
|
std::size_t getBytesAllocated() const override
|
||||||
{
|
{
|
||||||
return bytes_allocated + key_size_is_fixed ? fixed_size_keys_pool->size() : keys_pool->size();
|
return bytes_allocated + (key_size_is_fixed ? fixed_size_keys_pool->size() : keys_pool->size());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t getQueryCount() const override { return query_count.load(std::memory_order_relaxed); }
|
std::size_t getQueryCount() const override { return query_count.load(std::memory_order_relaxed); }
|
||||||
@ -601,9 +601,9 @@ private:
|
|||||||
auto stream = source_ptr->loadKeys(in_key_columns, in_requested_rows);
|
auto stream = source_ptr->loadKeys(in_key_columns, in_requested_rows);
|
||||||
stream->readPrefix();
|
stream->readPrefix();
|
||||||
|
|
||||||
MapType<UInt8> remaining_keys{in_requested_rows.size()};
|
MapType<bool> remaining_keys{in_requested_rows.size()};
|
||||||
for (const auto row : in_requested_rows)
|
for (const auto row : in_requested_rows)
|
||||||
remaining_keys.insert({ in_keys[row], 0 });
|
remaining_keys.insert({ in_keys[row], false });
|
||||||
|
|
||||||
std::uniform_int_distribution<std::uint64_t> distribution{
|
std::uniform_int_distribution<std::uint64_t> distribution{
|
||||||
dict_lifetime.min_sec,
|
dict_lifetime.min_sec,
|
||||||
@ -676,7 +676,7 @@ private:
|
|||||||
/// inform caller
|
/// inform caller
|
||||||
on_cell_updated(key, cell_idx);
|
on_cell_updated(key, cell_idx);
|
||||||
/// mark corresponding id as found
|
/// mark corresponding id as found
|
||||||
remaining_keys[key] = 1;
|
remaining_keys[key] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user