File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/main/java/com/starrocks/connector/flink/manager Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -423,20 +423,20 @@ private void validateTableStructure(TableSchema flinkSchema) {
423
423
throw new IllegalArgumentException ("Couldn't get the sink table's column info." );
424
424
}
425
425
// validate primary keys
426
- List <String > primayKeys = new ArrayList <>();
426
+ List <String > primaryKeys = new ArrayList <>();
427
427
for (int i = 0 ; i < rows .size (); i ++) {
428
428
String keysType = rows .get (i ).get ("COLUMN_KEY" ).toString ();
429
429
if (!"PRI" .equals (keysType )) {
430
430
continue ;
431
431
}
432
- primayKeys .add (rows .get (i ).get ("COLUMN_NAME" ).toString ().toLowerCase ());
432
+ primaryKeys .add (rows .get (i ).get ("COLUMN_NAME" ).toString ().toLowerCase ());
433
433
}
434
- if (!primayKeys .isEmpty ()) {
434
+ if (!primaryKeys .isEmpty ()) {
435
435
if (!constraint .isPresent ()) {
436
436
throw new IllegalArgumentException ("Primary keys not defined in the sink `TableSchema`." );
437
437
}
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 ()))) {
440
440
throw new IllegalArgumentException ("Primary keys of the flink `TableSchema` do not match with the ones from starrocks table." );
441
441
}
442
442
sinkOptions .enableUpsertDelete ();
You can’t perform that action at this time.
0 commit comments