-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Labels
potential bugTo be reviewed by developers and confirmed/rejected.To be reviewed by developers and confirmed/rejected.
Description
Company or project name
No response
Describe what's wrong
This does not work and will report an error.
CREATE TABLE test_split (
id Int32,
input String
) ENGINE = Memory;
INSERT INTO test_split VALUES
(1, 'a#b#c#d');
SELECT
id,
CASE id
WHEN 1 THEN splitByString('#', input)
ELSE splitByString('', '')
END AS result
FROM test_split;But SELECT splitByString('#', input) FROM test_split and SELECT splitByString('', '') FROM test_split work normally.
Seems that CASE is having trouble when dealing with splitByString?
Does it reproduce on the most recent release?
Yes
How to reproduce
CREATE TABLE test_split (
id Int32,
input String
) ENGINE = Memory;
INSERT INTO test_split VALUES
(1, 'a#b#c#d');
SELECT
id,
CASE id
WHEN 1 THEN splitByString('#', input)
ELSE splitByString('', '')
END AS result
FROM test_split;
Expected behavior
Ouput ['a','b','c','d']
Error message and/or stacktrace
Code: 36. DB::Exception: Unexpected type Array(String) in function 'transform'. (BAD_ARGUMENTS) (version 25.1.1.1807 (official build))
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
potential bugTo be reviewed by developers and confirmed/rejected.To be reviewed by developers and confirmed/rejected.