Skip to content

Commit 7cff4bb

Browse files
committed
fix: SQLServer discover index name with null
1 parent 524433c commit 7cff4bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

connectors-common/sql-core/src/main/java/io/tapdata/common/CommonDbConnector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ protected List<TapIndex> discoverIndex(String tableName) {
513513
} catch (SQLException e) {
514514
throw new RuntimeException(e);
515515
}
516-
Map<String, List<DataMap>> indexMap = indexList.stream()
516+
Map<String, List<DataMap>> indexMap = indexList.stream().filter(idx -> EmptyKit.isNotBlank(idx.getString("indexName")))
517517
.collect(Collectors.groupingBy(idx -> idx.getString("indexName"), LinkedHashMap::new, Collectors.toList()));
518518
indexMap.forEach((key, value) -> tapIndexList.add(makeTapIndex(key, value)));
519519
return tapIndexList;

0 commit comments

Comments
 (0)