Skip to content

Commit

Permalink
Move updateColumnComment next to updateTableComment
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Mar 4, 2022
1 parent 902f4b2 commit c55bc4f
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,15 @@ public void updateTableComment(ConnectorSession session, SchemaTableName schemaT
}
}

@Override
public void updateColumnComment(ConnectorSession session, SchemaTableName schemaTableName, ColumnIdentity columnIdentity, Optional<String> comment)
{
metastore.commentColumn(schemaTableName.getSchemaName(), schemaTableName.getTableName(), columnIdentity.getName(), comment);

Table icebergTable = loadTable(session, schemaTableName);
icebergTable.updateSchema().updateColumnDoc(columnIdentity.getName(), comment.orElse(null)).commit();
}

@Override
public String defaultTableLocation(ConnectorSession session, SchemaTableName schemaTableName)
{
Expand Down Expand Up @@ -723,15 +732,6 @@ private List<String> listNamespaces(ConnectorSession session, Optional<String> n
return listNamespaces(session);
}

@Override
public void updateColumnComment(ConnectorSession session, SchemaTableName schemaTableName, ColumnIdentity columnIdentity, Optional<String> comment)
{
metastore.commentColumn(schemaTableName.getSchemaName(), schemaTableName.getTableName(), columnIdentity.getName(), comment);

Table icebergTable = loadTable(session, schemaTableName);
icebergTable.updateSchema().updateColumnDoc(columnIdentity.getName(), comment.orElse(null)).commit();
}

private static class MaterializedViewMayBeBeingRemovedException
extends RuntimeException
{
Expand Down

0 comments on commit c55bc4f

Please sign in to comment.