mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 21:12:28 +00:00
bind only full identifier
This commit is contained in:
parent
64dba76afe
commit
3a8ca9a68b
@ -4102,7 +4102,7 @@ IdentifierResolveResult QueryAnalyzer::tryResolveIdentifier(const IdentifierLook
|
|||||||
* SELECT id FROM ( SELECT ... ) AS subquery ARRAY JOIN [0] AS id INNER JOIN second_table USING (id)
|
* SELECT id FROM ( SELECT ... ) AS subquery ARRAY JOIN [0] AS id INNER JOIN second_table USING (id)
|
||||||
* In the example, identifier `id` should be resolved into one from USING (id) column.
|
* In the example, identifier `id` should be resolved into one from USING (id) column.
|
||||||
*/
|
*/
|
||||||
auto alias_it = scope.alias_name_to_expression_node.find(identifier_lookup.identifier.front());
|
auto alias_it = scope.alias_name_to_expression_node.find(identifier_lookup.identifier.getFullName());
|
||||||
if (alias_it != scope.alias_name_to_expression_node.end() && alias_it->second->getNodeType() == QueryTreeNodeType::COLUMN)
|
if (alias_it != scope.alias_name_to_expression_node.end() && alias_it->second->getNodeType() == QueryTreeNodeType::COLUMN)
|
||||||
{
|
{
|
||||||
const auto & column_node = alias_it->second->as<ColumnNode &>();
|
const auto & column_node = alias_it->second->as<ColumnNode &>();
|
||||||
|
Loading…
Reference in New Issue
Block a user