static boolean hasMatchingLength(Column column, ColumnInformation columnInformation, Metadata metadata, Dialect dialect) {
final int actualSize = columnInformation.getColumnSize();
final int actualDecimalDigits = columnInformation.getDecimalDigits();
if ( actualSize == 0 && actualDecimalDigits == 0 ) {
return true;
}
else {
final Size size = column.getColumnSize( dialect, metadata );
final Long requiredLength = size.getLength();
final Integer requiredPrecision = size.getPrecision();
return requiredLength != null && requiredLength == actualSize
|| requiredPrecision != null && requiredPrecision == actualDecimalDigits
|| requiredPrecision != null && requiredPrecision == actualSize
|| requiredPrecision == null && requiredLength == null;
}
}