Build fix + reviews

This commit is contained in:
Yarik Briukhovetskyi 2024-12-04 18:15:19 +01:00 committed by GitHub
parent 70fce88bde
commit 35c0ea345f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 7 deletions

View File

@ -1104,8 +1104,6 @@ QueryTreeNodePtr QueryTreeBuilder::setFirstArgumentAsParameter(const ASTFunction
"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();
auto function_node = std::make_shared<FunctionNode>(function->name);

View File

@ -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]/[]
488890

View File

@ -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', []);
SELECT groupConcat(',', p_int) FROM test_groupConcat;
SELECT groupConcat('.')(p_string) FROM test_groupConcat;
SELECT groupConcat('/', p_array) FROM test_groupConcat;
SELECT groupConcat(',', p_int) FROM test_groupConcat SETTINGS enable_analyzer=1;
SELECT groupConcat('.')(p_string) FROM test_groupConcat SETTINGS enable_analyzer=1;
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;
SELECT group_concat('/', p_array) FROM test_groupConcat SETTINGS enable_analyzer=1;
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;