-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Cast bug #9810
Copy link
Copy link
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasest-acceptedThe issue is in our backlog, ready to takeThe issue is in our backlog, ready to take
Description
Received exception: DB::Exception: Second argument to CAST must be a constant string describing type (version 19.17.2.4 (official build))
select cast(1 as String)
from (select 1 as iid) as t1
join (select '1' as sid) as t2 on t2.sid = cast(t1.iid as String)
On version 19.4.5.1 this query works fine.
Also if I change some parts in this query it will be work without exceptions, for example:
select cast(1 as Date) -- or another type except String
from (select 1 as iid) as t1
join (select '1' as sid) as t2 on t2.sid = cast(t1.iid as String)
select cast(1 as String)
from (select 1 as iid) as t1
select cast(1 as String) -- or another type
from (select 1 as iid) as t1
join (select '1' as sid) as t2 on cast(t2.sid as UInt8) = t1.iid
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasest-acceptedThe issue is in our backlog, ready to takeThe issue is in our backlog, ready to take