mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix: support Glue table statistics deletion (#1324)
This commit is contained in:
1 parent
c9e4f931b7
commit
5a964e516d
5 files changed
+94
No files matched your search
@@ -116,6 +116,7 @@ public class GlueJsonHandler {
|
||||
}
|
||||
case "UpdateColumnStatisticsForTable" -> handleUpdateColumnStatisticsForTable(request);
|
||||
case "GetColumnStatisticsForTable" -> handleGetColumnStatisticsForTable(request);
|
||||
case "DeleteColumnStatisticsForTable" -> handleDeleteColumnStatisticsForTable(request);
|
||||
case "CreatePartition" -> {
|
||||
String dbName = request.get("DatabaseName").asText();
|
||||
String tableName = request.get("TableName").asText();
|
||||
@@ -191,6 +192,14 @@ public class GlueJsonHandler {
|
||||
.build();
|
||||
}
|
||||
|
||||
private Response handleDeleteColumnStatisticsForTable(JsonNode request) {
|
||||
String dbName = request.get("DatabaseName").asText();
|
||||
String tableName = request.get("TableName").asText();
|
||||
String columnName = request.get("ColumnName").asText();
|
||||
glueService.deleteColumnStatisticsForTable(dbName, tableName, columnName);
|
||||
return Response.ok().build();
|
||||
}
|
||||
|
||||
private Response handleBatchCreatePartition(JsonNode request) {
|
||||
String dbName = request.get("DatabaseName").asText();
|
||||
String tableName = request.get("TableName").asText();
|
||||
|
||||
@@ -308,6 +308,11 @@ public class GlueService {
|
||||
return new ColumnStatisticsResult(columnStatistics, errors);
|
||||
}
|
||||
|
||||
public void deleteColumnStatisticsForTable(String databaseName, String tableName, String columnName) {
|
||||
getTable(databaseName, tableName);
|
||||
columnStatisticsStore.delete(columnStatisticsKey(databaseName, tableName, columnName));
|
||||
}
|
||||
|
||||
public void createPartition(String databaseName, String tableName, Partition partition) {
|
||||
Table table = getTable(databaseName, tableName);
|
||||
String key = partitionKey(databaseName, tableName, partition.getValues());
|
||||
|
||||
Reference in new issue
Block a user