select.addSymbol(new AllSymbol());
query.setSelect(select);
From from = new From();
UnaryFromClause ufc = new UnaryFromClause();
from.addClause(ufc);
ufc.setGroup(new GroupSymbol("t1")); //$NON-NLS-1$
query.setFrom(from);
Query query1 = new Query();
select = new Select();
select.addSymbol(new AllSymbol());
query1.setSelect(select);
from = new From();
ufc = new UnaryFromClause();
from.addClause(ufc);
ufc.setGroup(new GroupSymbol("t2")); //$NON-NLS-1$
query1.setFrom(from);
SetQuery sq = new SetQuery(Operation.UNION, false, query, query1);
CacheHint hint = new CacheHint();
hint.setPrefersMemory(true);