mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 03:25:15 +00:00
add comment
This commit is contained in:
parent
39ff030a6e
commit
39db0f84d9
@ -302,7 +302,7 @@ void GraceHashJoin::initBuckets()
|
|||||||
current_bucket->startJoining();
|
current_bucket->startJoining();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GraceHashJoin::isSupported(const std::shared_ptr<TableJoin> & table_join [[maybe_unused]])
|
bool GraceHashJoin::isSupported(const std::shared_ptr<TableJoin> & table_join)
|
||||||
{
|
{
|
||||||
|
|
||||||
bool is_asof = (table_join->strictness() == JoinStrictness::Asof);
|
bool is_asof = (table_join->strictness() == JoinStrictness::Asof);
|
||||||
@ -472,8 +472,10 @@ bool GraceHashJoin::alwaysReturnsEmptySet() const
|
|||||||
return hash_join_is_empty;
|
return hash_join_is_empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
IBlocksStreamPtr GraceHashJoin::getNonJoinedBlocks(
|
// This is only be called for bucket[0] at present. other buckets non-joined blocks are generated in
|
||||||
const Block & left_sample_block_ [[maybe_unused]], const Block & result_sample_block_ [[maybe_unused]], UInt64 max_block_size_ [[maybe_unused]]) const
|
// DelayedBlocks.
|
||||||
|
IBlocksStreamPtr
|
||||||
|
GraceHashJoin::getNonJoinedBlocks(const Block & left_sample_block_, const Block & result_sample_block_, UInt64 max_block_size_) const
|
||||||
{
|
{
|
||||||
return hash_join->getNonJoinedBlocks(left_sample_block_, result_sample_block_, max_block_size_);
|
return hash_join->getNonJoinedBlocks(left_sample_block_, result_sample_block_, max_block_size_);
|
||||||
}
|
}
|
||||||
@ -510,6 +512,8 @@ public:
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
// When left reader finish, return non-joined blocks.
|
||||||
|
// empty block means the end of this stream.
|
||||||
if (!is_left_reader_finished)
|
if (!is_left_reader_finished)
|
||||||
{
|
{
|
||||||
block = left_reader.read();
|
block = left_reader.read();
|
||||||
@ -521,6 +525,7 @@ public:
|
|||||||
}
|
}
|
||||||
if (is_left_reader_finished)
|
if (is_left_reader_finished)
|
||||||
{
|
{
|
||||||
|
// full/right join, non_joined_blocks != nullptr
|
||||||
if (non_joined_blocks)
|
if (non_joined_blocks)
|
||||||
{
|
{
|
||||||
block = non_joined_blocks->next();
|
block = non_joined_blocks->next();
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include <base/FnTraits.h>
|
#include <base/FnTraits.h>
|
||||||
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -865,6 +864,7 @@ Block NotJoinedBlocks::nextImpl()
|
|||||||
size_t rows_added = filler->fillColumns(columns_right);
|
size_t rows_added = filler->fillColumns(columns_right);
|
||||||
if (rows_added == 0)
|
if (rows_added == 0)
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
addLeftColumns(result_block, rows_added);
|
addLeftColumns(result_block, rows_added);
|
||||||
addRightColumns(result_block, columns_right);
|
addRightColumns(result_block, columns_right);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user