mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 18:02:24 +00:00
Build fix + reviews
This commit is contained in:
parent
70fce88bde
commit
35c0ea345f
@ -1104,8 +1104,6 @@ QueryTreeNodePtr QueryTreeBuilder::setFirstArgumentAsParameter(const ASTFunction
|
|||||||
"If groupConcat is used with two arguments, the first argument must be a constant String");
|
"If groupConcat is used with two arguments, the first argument must be a constant String");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string separator = first_arg_literal->value.safeGet<String>();
|
|
||||||
|
|
||||||
ASTPtr second_arg = function->arguments->children[1]->clone();
|
ASTPtr second_arg = function->arguments->children[1]->clone();
|
||||||
|
|
||||||
auto function_node = std::make_shared<FunctionNode>(function->name);
|
auto function_node = std::make_shared<FunctionNode>(function->name);
|
||||||
|
@ -22,4 +22,6 @@ abc.a.makson95
|
|||||||
[1,2,3]/[993,986,979,972]/[]
|
[1,2,3]/[993,986,979,972]/[]
|
||||||
[1,2,3]/[993,986,979,972]/[]
|
[1,2,3]/[993,986,979,972]/[]
|
||||||
[1,2,3]/[993,986,979,972]/[]
|
[1,2,3]/[993,986,979,972]/[]
|
||||||
|
[1,2,3]/[993,986,979,972]/[]
|
||||||
|
[1,2,3]/[993,986,979,972]/[]
|
||||||
488890
|
488890
|
||||||
|
@ -48,12 +48,14 @@ TRUNCATE TABLE test_groupConcat;
|
|||||||
|
|
||||||
INSERT INTO test_groupConcat VALUES (0, 95, 'abc', [1, 2, 3]), (1, NULL, 'a', [993, 986, 979, 972]), (2, 123, 'makson95', []);
|
INSERT INTO test_groupConcat VALUES (0, 95, 'abc', [1, 2, 3]), (1, NULL, 'a', [993, 986, 979, 972]), (2, 123, 'makson95', []);
|
||||||
|
|
||||||
SELECT groupConcat(',', p_int) FROM test_groupConcat;
|
SELECT groupConcat(',', p_int) FROM test_groupConcat SETTINGS enable_analyzer=1;
|
||||||
SELECT groupConcat('.')(p_string) FROM test_groupConcat;
|
SELECT groupConcat('.')(p_string) FROM test_groupConcat SETTINGS enable_analyzer=1;
|
||||||
SELECT groupConcat('/', p_array) FROM test_groupConcat;
|
SELECT groupConcat('/', p_array) FROM test_groupConcat SETTINGS enable_analyzer=1;
|
||||||
|
|
||||||
SELECT group_concat('/', p_array) FROM test_groupConcat;
|
SELECT group_concat('/', p_array) FROM test_groupConcat SETTINGS enable_analyzer=1;
|
||||||
SELECT grouP_CONcat('/', p_array) FROM test_groupConcat;
|
SELECT grouP_CONcat('/', p_array) FROM test_groupConcat SETTINGS enable_analyzer=1;
|
||||||
|
SELECT grouP_CONcat(',')('/', p_array) FROM test_groupConcat SETTINGS enable_analyzer=1; -- overrides current parameter
|
||||||
|
SELECT grouP_CONcat(',', 2)('/', p_array) FROM test_groupConcat SETTINGS enable_analyzer=1; -- works fine with both arguments
|
||||||
|
|
||||||
DROP TABLE IF EXISTS test_groupConcat;
|
DROP TABLE IF EXISTS test_groupConcat;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user