Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanda Bozigian committed Apr 8, 2024
1 parent 9fdecae commit 6f2ead6
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,11 @@ TableDto updateMView(
/**
* Update table.
*
* @param catalogName catalog name
* @param databaseName database name
* @param tableName table name
* @param table table
* @param catalogName catalog name
* @param databaseName database name
* @param tableName table name
* @param includeSecureMetadata consider updates to secure metadata if true
* @param table table
* @return table
*/
@PUT
Expand All @@ -574,6 +575,9 @@ TableDto updateTable(
String databaseName,
@PathParam("table-name")
String tableName,
@DefaultValue("false")
@QueryParam("includeSecureMetadata")
Boolean includeSecureMetadata,
TableDto table
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,18 @@ void renameTable(
/**
* Update table.
*
* @param catalogName catalog name
* @param databaseName database name
* @param tableName table name
* @param table table
* @param catalogName catalog name
* @param databaseName database name
* @param tableName table name
* @param includeSecureMetadata consider updates to secure metadata if true
* @param table table
* @return table
*/
TableDto updateTable(
final String catalogName,
final String databaseName,
final String tableName,
final boolean includeSecureMetadata,
final TableDto table
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ public TableDto updateTable(
@PathVariable("database-name") final String databaseName,
@ApiParam(value = "The name of the table", required = true)
@PathVariable("table-name") final String tableName,
@ApiParam(value = "To consider any updates to secure metadata in the request", required = false)
@ApiParam(value = "To consider updates to secure metadata if true", required = false)
@RequestParam(name = "includeSecureMetadata", defaultValue = "false") final boolean includeSecureMetadata,
@ApiParam(value = "The table information", required = true)
@RequestBody final TableDto table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ public PartitionsSaveResponseDto savePartitions(
dto.setName(name);
dto.setDefinitionMetadata(partitionsSaveRequestDto.getDefinitionMetadata());
dto.setDataMetadata(partitionsSaveRequestDto.getDataMetadata());
this.v1.updateTable(catalogName, databaseName, tableName, dto);
this.v1.updateTable(catalogName, databaseName, tableName, false, dto);
}
}
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ public void alter_table_with_environment_context(
v1.renameTable(catalogName, oldName.getDatabaseName(), oldName.getTableName(),
newName.getTableName());
}
v1.updateTable(catalogName, dbname, newName.getTableName(), dto);
v1.updateTable(catalogName, dbname, newName.getTableName(), false, dto);
return null;
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ class CatalogThriftHiveMetastoreSpec extends Specification {
} else {
0 * metacatV1.renameTable(_, _, _, _)
}
1 * metacatV1.updateTable(_, _, _, _)
1 * metacatV1.updateTable(_, _, _, _, _)
registry.clock() >> clock
registry.timer(_) >> timer
timer.record(_, _) >> {}
Expand Down Expand Up @@ -659,7 +659,7 @@ class CatalogThriftHiveMetastoreSpec extends Specification {
} else {
0 * metacatV1.renameTable(_, _, _, _)
}
1 * metacatV1.updateTable(_, _, _, _)
1 * metacatV1.updateTable(_, _, _, _, _)
registry.clock() >> clock
registry.timer(_) >> timer
timer.record(_, _) >> {}
Expand Down Expand Up @@ -692,7 +692,7 @@ class CatalogThriftHiveMetastoreSpec extends Specification {
} else {
0 * metacatV1.renameTable(_, _, _, _)
}
1 * metacatV1.updateTable(_, _, _, _)
1 * metacatV1.updateTable(_, _, _, _, _)
registry.clock() >> clock
registry.timer(_) >> timer
timer.record(_, _) >> {}
Expand Down

0 comments on commit 6f2ead6

Please sign in to comment.