Upd comments for StoreageJoin

This commit is contained in:
vdimir 2021-05-10 16:39:32 +03:00
parent bd90b52f8e
commit f03f591e55
No known key found for this signature in database
GPG Key ID: F57B3E10A21DBB31
3 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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());

View File

@ -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;