mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
stash
This commit is contained in:
parent
292800eb0a
commit
5f93afede5
@ -693,16 +693,14 @@ bool HashJoin::addBlockToJoin(ScatteredBlock & source_block, bool check_limits)
|
||||
|
||||
if (!flag_per_row && save_nullmap && is_inserted)
|
||||
{
|
||||
data->blocks_nullmaps_allocated_size
|
||||
+= null_map_holder->size() ? null_map_holder->allocatedBytes() * rows / null_map_holder->size() : 0;
|
||||
data->blocks_nullmaps.emplace_back(stored_block, null_map_holder);
|
||||
data->blocks_nullmaps_allocated_size += data->blocks_nullmaps.back().allocatedBytes();
|
||||
}
|
||||
|
||||
if (!flag_per_row && not_joined_map && is_inserted)
|
||||
{
|
||||
data->blocks_nullmaps_allocated_size
|
||||
+= not_joined_map->size() ? not_joined_map->allocatedBytes() * rows / not_joined_map->size() : 0;
|
||||
data->blocks_nullmaps.emplace_back(stored_block, std::move(not_joined_map));
|
||||
data->blocks_nullmaps_allocated_size += data->blocks_nullmaps.back().allocatedBytes();
|
||||
}
|
||||
|
||||
if (!flag_per_row && !is_inserted)
|
||||
|
@ -337,7 +337,7 @@ public:
|
||||
using RawBlockPtr = const ScatteredBlock *;
|
||||
struct NullMapHolder
|
||||
{
|
||||
size_t allocatedBytes() const { return column->size() ? column->allocatedBytes() * block->rows() / column->size() : 0; }
|
||||
size_t allocatedBytes() const { return !column->empty() ? column->allocatedBytes() * block->rows() / column->size() : 0; }
|
||||
|
||||
RawBlockPtr block;
|
||||
ColumnPtr column;
|
||||
|
@ -254,13 +254,11 @@ struct ScatteredBlock : private boost::noncopyable
|
||||
/// Whether `block` was scattered, i.e. `selector` != [0, block.rows())
|
||||
bool wasScattered() const
|
||||
{
|
||||
chassert(block);
|
||||
return selector.size() != block.rows();
|
||||
}
|
||||
|
||||
const ColumnWithTypeAndName & getByName(const std::string & name) const
|
||||
{
|
||||
chassert(block);
|
||||
return block.getByName(name);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user