Skip to content

Commit 70a542a

Browse files
committed
Handle description and tag updates
1 parent 846d4ba commit 70a542a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

catalog-rest-service/src/main/java/org/openmetadata/catalog/jdbi3/TableRepository.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,10 +825,12 @@ private void updateColumns(
825825
for (Column deleted : deletedColumns) {
826826
if (addedColumnMap.containsKey(deleted.getName())) {
827827
Column addedColumn = addedColumnMap.get(deleted.getName());
828-
if (addedColumn.getDescription().isEmpty() && !deleted.getDescription().isEmpty()) {
828+
if ((addedColumn.getDescription() == null || addedColumn.getDescription().isEmpty())
829+
&& (deleted.getDescription() == null || !deleted.getDescription().isEmpty())) {
829830
addedColumn.setDescription(deleted.getDescription());
830831
}
831-
if (addedColumn.getTags().isEmpty() && !deleted.getTags().isEmpty()) {
832+
if ((addedColumn.getTags() == null || addedColumn.getTags().isEmpty())
833+
&& (deleted.getTags() == null || !deleted.getTags().isEmpty())) {
832834
addedColumn.setTags(deleted.getTags());
833835
}
834836
}

0 commit comments

Comments
 (0)