Details
Description
the issue can be reproduced
1. create table myTbl1 (name varchar(1000));
2. create table myTbl2 (name varchar(1000));
3. create view myView (name) as select t1.name from myTbl1 t1 union all select t2.name from myTbl2 t2;
4. select name from myView where upper(name) in ('AA', 'BB');
#4 failed with "org.apache.derby.impl.sql.compile.SimpleStringOperatorNode incompatible with org.apache.derby.impl.sql.compile.ColumnReference: java.lang.ClassCastException"
If the view is created as "create myView (name) as select t1.name from myTbl1 t1", the query worked fine.