private boolean isBroader ( AttributeType enrichedTypeGuess , AttributeType columnTypeGuess ) { if ( columnTypeGuess == null && enrichedTypeGuess != null || columnTypeGuess == null ) { return true ; } switch ( columnTypeGuess ) { case INT : return enrichedTypeGuess . equals ( INT ) || enrichedTypeGuess . equals ( LONG ) || enrichedTypeGuess . equals ( DECIMAL ) || enrichedTypeGuess . equals ( STRING ) || enrichedTypeGuess . equals ( TEXT ) ; case DECIMAL : return enrichedTypeGuess . equals ( DECIMAL ) || enrichedTypeGuess . equals ( DATE ) || enrichedTypeGuess . equals ( DATE_TIME ) || enrichedTypeGuess . equals ( STRING ) || enrichedTypeGuess . equals ( TEXT ) ; case LONG : return enrichedTypeGuess . equals ( LONG ) || enrichedTypeGuess . equals ( DECIMAL ) || enrichedTypeGuess . equals ( DATE ) || enrichedTypeGuess . equals ( DATE_TIME ) || enrichedTypeGuess . equals ( STRING ) || enrichedTypeGuess . equals ( TEXT ) ; case BOOL : return enrichedTypeGuess . equals ( STRING ) || enrichedTypeGuess . equals ( TEXT ) ; case STRING : return enrichedTypeGuess . equals ( STRING ) || enrichedTypeGuess . equals ( TEXT ) ; case DATE_TIME : return enrichedTypeGuess . equals ( STRING ) || enrichedTypeGuess . equals ( TEXT ) ; case DATE : return enrichedTypeGuess . equals ( STRING ) || enrichedTypeGuess . equals ( TEXT ) ; default : return false ; } }
Check if the new enriched type is broader the the previously found type