mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Implement untuple field access (#18309)
This commit is contained in:
parent
5fd6f260ac
commit
93d28ef5c9
@ -286,6 +286,17 @@ void removeUnneededColumnsFromSelectClause(const ASTSelectQuery * select_query,
|
||||
{
|
||||
new_elements.push_back(elem);
|
||||
}
|
||||
else
|
||||
{
|
||||
ASTFunction * func = elem->as<ASTFunction>();
|
||||
if (func && func->name == "untuple")
|
||||
for (const auto & col : required_result_columns)
|
||||
if (col.rfind("_ut_", 0) == 0)
|
||||
{
|
||||
new_elements.push_back(elem);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
elements = std::move(new_elements);
|
||||
|
@ -0,0 +1 @@
|
||||
1
|
1
tests/queries/0_stateless/01616_untuple_access_field.sql
Normal file
1
tests/queries/0_stateless/01616_untuple_access_field.sql
Normal file
@ -0,0 +1 @@
|
||||
select _ut_1 from (select untuple((1,2)));
|
Loading…
Reference in New Issue
Block a user