Skip to content

Commit 9f93df0

Browse files
committed
Fix typo
Signed-off-by: Jiandong Chen <[email protected]>
1 parent 56feac7 commit 9f93df0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/java/com/starrocks/connector/flink/manager/StarRocksSinkManager.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,20 +423,20 @@ private void validateTableStructure(TableSchema flinkSchema) {
423423
throw new IllegalArgumentException("Couldn't get the sink table's column info.");
424424
}
425425
// validate primary keys
426-
List<String> primayKeys = new ArrayList<>();
426+
List<String> primaryKeys = new ArrayList<>();
427427
for (int i = 0; i < rows.size(); i++) {
428428
String keysType = rows.get(i).get("COLUMN_KEY").toString();
429429
if (!"PRI".equals(keysType)) {
430430
continue;
431431
}
432-
primayKeys.add(rows.get(i).get("COLUMN_NAME").toString().toLowerCase());
432+
primaryKeys.add(rows.get(i).get("COLUMN_NAME").toString().toLowerCase());
433433
}
434-
if (!primayKeys.isEmpty()) {
434+
if (!primaryKeys.isEmpty()) {
435435
if (!constraint.isPresent()) {
436436
throw new IllegalArgumentException("Primary keys not defined in the sink `TableSchema`.");
437437
}
438-
if (constraint.get().getColumns().size() != primayKeys.size() ||
439-
!constraint.get().getColumns().stream().allMatch(col -> primayKeys.contains(col.toLowerCase()))) {
438+
if (constraint.get().getColumns().size() != primaryKeys.size() ||
439+
!constraint.get().getColumns().stream().allMatch(col -> primaryKeys.contains(col.toLowerCase()))) {
440440
throw new IllegalArgumentException("Primary keys of the flink `TableSchema` do not match with the ones from starrocks table.");
441441
}
442442
sinkOptions.enableUpsertDelete();

0 commit comments

Comments
 (0)