Omit cast if res_ty and ty are either strings or untypedAtomic due to the same handling of them in SQL.
Omit cast if res_ty and ty are either strings or untypedAtomic due to the same
handling of them in SQL.

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb