@Override
protected void processColumnWithQuoteSqlIdentifiers(
DbAttribute dbAttr,
Expression pathExp) throws IOException {
SimpleNode parent = null;
if (pathExp instanceof SimpleNode) {
parent = (SimpleNode) ((SimpleNode) pathExp).jjtGetParent();
}
// problem in derby : Comparisons between 'CLOB (UCS_BASIC)' and 'CLOB
// (UCS_BASIC)' are not supported.
// we need do it by casting the Clob to VARCHAR.
if (parent != null
&& (parent instanceof ASTEqual || parent instanceof ASTNotEqual)
&& dbAttr.getType() == Types.CLOB
&& parent.getOperandCount() == 2
&& parent.getOperand(1) instanceof String) {
Integer size = parent.getOperand(1).toString().length() + 1;
out.append("CAST(");
super.processColumnWithQuoteSqlIdentifiers(dbAttr, pathExp);
out.append(" AS VARCHAR(" + size + "))");
}
else {