mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Upd comments for StoreageJoin
This commit is contained in:
parent
bd90b52f8e
commit
f03f591e55
@ -717,7 +717,7 @@ public:
|
||||
|
||||
for (const auto & src_column : block_with_columns_to_add)
|
||||
{
|
||||
/// Column names `src_column.name` and `qualified_name` can be differ for StorageJoin,
|
||||
/// Column names `src_column.name` and `qualified_name` can differ for StorageJoin,
|
||||
/// because it uses not qualified right block column names
|
||||
auto qualified_name = join.getTableJoin().renamedRightColumnName(src_column.name);
|
||||
/// Don't insert column if it's in left block
|
||||
|
@ -92,7 +92,9 @@ HashJoinPtr StorageJoin::getJoinLocked(std::shared_ptr<TableJoin> analyzed_join)
|
||||
|
||||
/// TODO: check key columns
|
||||
|
||||
/// Some HACK to remove wrong names qualifiers: table.column -> column.
|
||||
/// Set names qualifiers: table.column -> column
|
||||
/// It's required because storage join stores non-qualified names
|
||||
/// Qualifies will be added by join implementation (HashJoin)
|
||||
analyzed_join->setRightKeys(key_names);
|
||||
|
||||
HashJoinPtr join_clone = std::make_shared<HashJoin>(analyzed_join, metadata_snapshot->getSampleBlock().sortColumns());
|
||||
|
@ -13,7 +13,7 @@ SELECT k, js1.s, t2.s FROM (SELECT toUInt64(number / 3) AS k, sum(number) as s F
|
||||
|
||||
SELECT k, js1.s, t2.s FROM (SELECT number AS k, number AS s FROM system.numbers LIMIT 10) js1 ANY LEFT JOIN t2 ON js1.k == t2.k;
|
||||
|
||||
-- geting qualified key columns from Join table still doen't work
|
||||
-- getting qualified key columns from Join table still doen't work
|
||||
SELECT t2.k FROM (SELECT number AS k, number AS s FROM system.numbers LIMIT 10) js1 ANY LEFT JOIN t2 ON js1.k == t2.k; -- { serverError 8 }
|
||||
|
||||
DROP TABLE t2;
|
||||
|
Loading…
Reference in New Issue
Block a user