wuwen5 commented on code in PR #19964:
URL: https://github.com/apache/shardingsphere/pull/19964#discussion_r1575594633
##########
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/dialect/H2SchemaMetaDataLoader.java:
##########
@@ -104,11 +105,10 @@ private Map<String, Collection<ColumnMetaData>>
loadColumnMetaDataMap(final Conn
private ColumnMetaData loadColumnMetaData(final Map<String, Integer>
dataTypeMap, final ResultSet resultSet, final Collection<String> primaryKeys,
final Map<String, Boolean>
tableGenerated) throws SQLException {
String columnName = resultSet.getString("COLUMN_NAME");
- String typeName = resultSet.getString("TYPE_NAME");
+ String dataType = resultSet.getString("DATA_TYPE");
boolean primaryKey = primaryKeys.contains(columnName);
boolean generated = tableGenerated.getOrDefault(columnName,
Boolean.FALSE);
- // H2 database case sensitive is always true
- return new ColumnMetaData(columnName, dataTypeMap.get(typeName),
primaryKey, generated, true, true);
Review Comment:
`dataTypeMap.getOrDefault(dataType, Integer.parseInt(dataType))`
Perhaps this can be compatible with `1.x` .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]