Skip to content

Commit

Permalink
[#1253] bugfix(jdbc): jdbc catalog store empty audit info fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Clearvive authored and Clearvive committed Dec 26, 2023
1 parent 3ece627 commit c8c2aad
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public Table loadTable(NameIdentifier tableIdent) throws NoSuchTableException {
}
Map<String, String> properties =
load.properties() == null ? Maps.newHashMap() : Maps.newHashMap(load.properties());
StringIdentifier.addToProperties(id, properties);
properties = StringIdentifier.addToProperties(id, properties);
return new JdbcTable.Builder()
.withAuditInfo(load.auditInfo())
.withName(tableName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,11 @@ void testAlterAndDropMysqlTable() {
Assertions.assertEquals("col_4", table.columns()[3].name());
Assertions.assertEquals(Types.StringType.get(), table.columns()[3].dataType());
Assertions.assertNull(table.columns()[3].comment());
Assertions.assertNotNull(table.auditInfo());
Assertions.assertNotNull(table.auditInfo().createTime());
Assertions.assertNotNull(table.auditInfo().creator());
Assertions.assertNotNull(table.auditInfo().lastModifiedTime());
Assertions.assertNotNull(table.auditInfo().lastModifier());

ColumnDTO col1 =
new ColumnDTO.Builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,11 @@ void testAlterAndDropPostgreSqlTable() {
Assertions.assertEquals(Types.StringType.get(), table.columns()[3].dataType());
Assertions.assertNull(table.columns()[3].comment());
Assertions.assertTrue(table.columns()[3].nullable());
Assertions.assertNotNull(table.auditInfo());
Assertions.assertNotNull(table.auditInfo().createTime());
Assertions.assertNotNull(table.auditInfo().creator());
Assertions.assertNotNull(table.auditInfo().lastModifiedTime());
Assertions.assertNotNull(table.auditInfo().lastModifier());

ColumnDTO col1 =
new ColumnDTO.Builder()
Expand Down

0 comments on commit c8c2aad

Please sign in to comment.