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