private void inferType( SQLExpression expr1, SQLExpression expr2 ) { PrimitiveType pt1 = expr1.getPrimitiveType(); PrimitiveType pt2 = expr2.getPrimitiveType(); if ( pt1 == null && pt2 != null ) { expr1.cast( expr2 ); } else if ( pt1 != null && pt2 == null ) { expr2.cast( expr1 ); } else if ( pt1 != null && pt2 != null ) { if ( pt1.getBaseType() != pt2.getBaseType() ) { LOG.warn( "Comparison on different types (" + pt1 + "/" + pt2 + "). Relying on db type conversion." ); } } }