mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Merge pull request #30075 from kitaisreal/sql-user-defined-functions-fix-alias
SQL user defined functions fix alias
This commit is contained in:
commit
8d544a55b7
@ -93,6 +93,11 @@ ASTPtr UserDefinedSQLFunctionMatcher::tryToReplaceFunction(const ASTFunction & f
|
||||
}
|
||||
}
|
||||
|
||||
auto function_alias = function.tryGetAlias();
|
||||
|
||||
if (!function_alias.empty())
|
||||
function_body_to_update->setAlias(function_alias);
|
||||
|
||||
return function_body_to_update;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
a UInt16
|
@ -0,0 +1,5 @@
|
||||
-- Tags: no-parallel
|
||||
|
||||
CREATE FUNCTION 02096_test_function AS x -> x + 1;
|
||||
DESCRIBE (SELECT 02096_test_function(1) AS a);
|
||||
DROP FUNCTION 02096_test_function;
|
Loading…
Reference in New Issue
Block a user