// resolve an expected type
SessionFactoryImplementor sessionFactory = getSessionFactoryHelper().getFactory();
if ( lhsType != null && rhsType != null ) {
int lhsColumnSpan = getColumnSpan( lhsType, sessionFactory );
if ( lhsColumnSpan != getColumnSpan( rhsType, sessionFactory ) ) {
throw new TypeMismatchException(
"left and right hand sides of a binary logic operator were incompatibile [" +
lhsType.getName() + " : "+ rhsType.getName() + "]"
);
}
if ( lhsColumnSpan > 1 ) {