ColumnReference elem = (ColumnReference)obj;
if (TypeFacility.RUNTIME_TYPES.STRING.equals(elem.getType()) && elem.getMetadataObject() != null && "uniqueidentifier".equalsIgnoreCase(elem.getMetadataObject().getNativeType())) { //$NON-NLS-1$
return Arrays.asList("cast(", elem, " as char(36))"); //$NON-NLS-1$ //$NON-NLS-2$
}
} else if (obj instanceof AggregateFunction) {
AggregateFunction af = (AggregateFunction)obj;
if (af.getName().equals(AggregateFunction.STDDEV_POP)) {
af.setName("STDDEVP"); //$NON-NLS-1$
} else if (af.getName().equals(AggregateFunction.STDDEV_SAMP)) {
af.setName("STDDEV"); //$NON-NLS-1$
} else if (af.getName().equals(AggregateFunction.VAR_POP)) {
af.setName("VARP"); //$NON-NLS-1$
} else if (af.getName().equals(AggregateFunction.VAR_SAMP)) {
af.setName("VAR"); //$NON-NLS-1$
}
}
return super.translate(obj, context);
}