mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
fix bug for query "select *, abc.*" should failed. (#11753)
This commit is contained in:
parent
2f877815fe
commit
9135cb1bf1
@ -210,13 +210,11 @@ void TranslateQualifiedNamesMatcher::visit(ASTExpressionList & node, const ASTPt
|
||||
if (tables_with_columns.empty())
|
||||
throw Exception("An asterisk cannot be replaced with empty columns.", ErrorCodes::LOGICAL_ERROR);
|
||||
has_asterisk = true;
|
||||
break;
|
||||
}
|
||||
else if (const auto * qa = child->as<ASTQualifiedAsterisk>())
|
||||
{
|
||||
visit(*qa, child, data); /// check if it's OK before rewrite
|
||||
has_asterisk = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
0
|
6
tests/queries/0_stateless/01333_select_abc_asterisk.sql
Normal file
6
tests/queries/0_stateless/01333_select_abc_asterisk.sql
Normal file
@ -0,0 +1,6 @@
|
||||
select *;
|
||||
|
||||
--error: should be failed for abc.*;
|
||||
select abc.*; --{serverError 47}
|
||||
select *, abc.*; --{serverError 47}
|
||||
select abc.*, *; --{serverError 47}
|
Loading…
Reference in New Issue
Block a user