Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiqian committed Aug 17, 2024
1 parent 215a4bf commit 7e97e83
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public Schema visit(DropColumnEvent event) {

@Override
public Schema visit(DropTableEvent event) {
return null;
return schema;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,15 @@ private void applySchemaChangeEvent(SchemaChangeEvent event) {
}
newSchema = SchemaUtils.applySchemaChangeEvent(tableInfo.schema, event);
}
if (newSchema != null) {
TableInfo tableInfo = new TableInfo();
tableInfo.schema = newSchema;
tableInfo.fieldGetters = new RecordData.FieldGetter[newSchema.getColumnCount()];
for (int i = 0; i < newSchema.getColumnCount(); i++) {
tableInfo.fieldGetters[i] =
StarRocksUtils.createFieldGetter(
newSchema.getColumns().get(i).getType(), i, zoneId);
}
tableInfoMap.put(tableId, tableInfo);
} else {
tableInfoMap.remove(tableId);
TableInfo tableInfo = new TableInfo();
tableInfo.schema = newSchema;
tableInfo.fieldGetters = new RecordData.FieldGetter[newSchema.getColumnCount()];
for (int i = 0; i < newSchema.getColumnCount(); i++) {
tableInfo.fieldGetters[i] =
StarRocksUtils.createFieldGetter(
newSchema.getColumns().get(i).getType(), i, zoneId);
}
tableInfoMap.put(tableId, tableInfo);
}

private StarRocksRowData applyDataChangeEvent(DataChangeEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ void testIncompatibleTypes() {
() ->
schemaDerivation.applySchemaChange(
new CreateTableEvent(TABLE_2, INCOMPATIBLE_SCHEMA)))
.hasRootCauseInstanceOf(IllegalStateException.class)
.hasRootCauseMessage("Incompatible types: \"INT\" and \"STRING\"");
.isInstanceOf(IllegalStateException.class)
.hasMessage("Incompatible types: \"INT\" and \"STRING\"");
}

@Test
Expand Down

0 comments on commit 7e97e83

Please sign in to comment.