mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Small fixes
This commit is contained in:
parent
20e67b7140
commit
236e7e3989
@ -33,8 +33,8 @@ class HashJoin;
|
||||
* The first bucket is joined in-memory via HashJoin::joinBlock, and the remaining buckets are written to the disk.
|
||||
*
|
||||
* 3) When the last thread reading left table block finishes, the last stage begins.
|
||||
* Each @DelayedJoiningBlocksProcessor calls repeatedly @getDelayedBlocks until there are no more unfinished buckets left.
|
||||
* Inside @getDelayedBlocks we select the next not processed bucket, load right table blocks from disk into in-memory HashJoin,
|
||||
* Each @DelayedJoinedBlocksTransform calls repeatedly @getDelayedBlocks until there are no more unfinished buckets left.
|
||||
* Inside @getDelayedBlocks we select the next unprocessed bucket, load right table blocks from disk into in-memory HashJoin,
|
||||
* And then join them with left table blocks.
|
||||
*
|
||||
* After joining the left table blocks, we can load non-joined rows from the right table for RIGHT/FULL JOINs.
|
||||
|
@ -415,7 +415,7 @@ IProcessor::Status DelayedJoinedBlocksTransform::prepare()
|
||||
{
|
||||
Chunk chunk;
|
||||
chunk.setChunkInfo(std::make_shared<DelayedBlocksTask>());
|
||||
output.pushData({.chunk = std::move(chunk), .exception = {}});
|
||||
output.push(std::move(chunk));
|
||||
output.finish();
|
||||
}
|
||||
|
||||
@ -428,7 +428,7 @@ IProcessor::Status DelayedJoinedBlocksTransform::prepare()
|
||||
{
|
||||
Chunk chunk;
|
||||
chunk.setChunkInfo(std::make_shared<DelayedBlocksTask>(delayed_blocks));
|
||||
output.pushData({.chunk = std::move(chunk), .exception = {}});
|
||||
output.push(std::move(chunk));
|
||||
}
|
||||
delayed_blocks = nullptr;
|
||||
return Status::PortFull;
|
||||
|
@ -147,7 +147,7 @@ private:
|
||||
class DelayedJoinedBlocksWorkerTransform : public IProcessor
|
||||
{
|
||||
public:
|
||||
DelayedJoinedBlocksWorkerTransform(Block output_header);
|
||||
explicit DelayedJoinedBlocksWorkerTransform(Block output_header);
|
||||
|
||||
String getName() const override { return "DelayedJoinedBlocksWorkerTransform"; }
|
||||
|
||||
|
@ -16,6 +16,6 @@
|
||||
</substitution>
|
||||
</substitutions>
|
||||
|
||||
<query short='numbers'>SELECT sum(n) FROM (SELECT number * 2 AS n FROM numbers_mt(10000000)) AS lhs JOIN (SELECT number * 3 AS n FROM numbers_mt(10000000)) AS rhs USING (n) SETTINGS {settings}</query>
|
||||
<query short='numbers_hashed'>SELECT sum(n) FROM (SELECT intHash64(number * 2) AS n FROM numbers_mt(10000000)) AS lhs JOIN (SELECT intHash64(number * 3) AS n FROM numbers_mt(10000000)) AS rhs USING (n) SETTINGS {settings}</query>
|
||||
<query short='numbers'>SELECT sum(n) FROM (SELECT number * 2 AS n FROM numbers_mt(10000000)) AS lhs JOIN (SELECT number * 3 AS n FROM numbers_mt(10000000)) AS rhs USING (n) SETTINGS {settings} FORMAT Null</query>
|
||||
<query short='numbers_hashed'>SELECT sum(n) FROM (SELECT intHash64(number * 2) AS n FROM numbers_mt(10000000)) AS lhs JOIN (SELECT intHash64(number * 3) AS n FROM numbers_mt(10000000)) AS rhs USING (n) SETTINGS {settings} FORMAT Null</query>
|
||||
</test>
|
||||
|
Loading…
Reference in New Issue
Block a user