mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Now concat always return string column
This commit is contained in:
parent
6a871f579f
commit
2d7ae27232
@ -214,7 +214,8 @@ protected:
|
||||
+ ", should be at least 2.",
|
||||
ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);
|
||||
|
||||
return getLeastSupertype(arguments);
|
||||
/// We always return Strings from concat, even if arguments were fixed strings.
|
||||
return std::make_shared<DataTypeString>();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -0,0 +1,3 @@
|
||||
aa aaaa
|
||||
aa 4
|
||||
aa String
|
@ -0,0 +1,3 @@
|
||||
SELECT toFixedString('aa' , 2 ) as a, concat(a, a);
|
||||
SELECT toFixedString('aa' , 2 ) as a, length(concat(a, a));
|
||||
SELECT toFixedString('aa' , 2 ) as a, toTypeName(concat(a, a));
|
Loading…
Reference in New Issue
Block a user