linghengqian commented on code in PR #19878:
URL: https://github.com/apache/shardingsphere/pull/19878#discussion_r939621087
##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java:
##########
@@ -139,7 +139,12 @@ private List<DataSetColumn> getActualColumns(final
Connection connection, final
while (resultSet.next()) {
DataSetColumn each = new DataSetColumn();
each.setName(resultSet.getString("COLUMN_NAME"));
- each.setType(resultSet.getString("TYPE_NAME").toLowerCase());
+ String typeName = resultSet.getString("TYPE_NAME");
+ if ("CHARACTER VARYING".equals(typeName)) {
+ each.setType("varchar");
+ } else {
+ each.setType(typeName.toLowerCase());
+ }
Review Comment:
- I think the behavior in the context of `BaseDDLIT#assertTableMetaData()`
is very strange.
- `DataSetMetaData expected = getDataSet().findMetaData(tableName);` for
this function, get
`shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/ddl/dataset/db/create_table.xml`
similar file with `DataSetLoader#getFile()`, get the expected `TYPE_NAME`.
- This is compared to the `TYPE_NAME` that the `BaseDDLIT#getActualColumns`
method gets from
`getActualDataSourceMap().get(each.getDataSourceName()).getConnection()`, the
expected `VARCHAR` is always `CHARACTER VARYING`.
- I don't Know if this is a legacy issue, after all so many IT modules only
need to change this file.
--
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]