fix collecting required columns in lambda

This commit is contained in:
chertus 2019-01-21 22:56:11 +03:00
parent c70e8cc5f0
commit 1d0bee7dee
3 changed files with 6 additions and 1 deletions

View File

@ -157,7 +157,7 @@ void RequiredSourceColumnsMatcher::visit(const ASTFunction & node, const ASTPtr
local_aliases.push_back(name); local_aliases.push_back(name);
/// visit child with masked local aliases /// visit child with masked local aliases
visit(node.arguments->children[1], data); RequiredSourceColumnsVisitor(data).visit(node.arguments->children[1]);
for (const auto & name : local_aliases) for (const auto & name : local_aliases)
data.private_aliases.erase(name); data.private_aliases.erase(name);

View File

@ -0,0 +1,5 @@
CREATE TABLE IF NOT EXISTS test.sign (Sign Int8, Arr Array(Int8)) ENGINE = Memory;
SELECT arrayMap(x -> x * Sign, Arr) FROM test.sign;
DROP TABLE test.sign;