mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -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
@@ -804,6 +804,23 @@ class GlueServiceTest {
|
||||
assertEquals("LONG", ((Map<?, ?>) fetched.columnStatisticsList().get(0).get("StatisticsData")).get("Type"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void columnStatisticsCanBeDeleted() {
|
||||
Table table = new Table();
|
||||
table.setName("plain");
|
||||
glueService.createTable("db1", table);
|
||||
glueService.updateColumnStatisticsForTable("db1", "plain", List.of(columnStatistics("id")));
|
||||
|
||||
glueService.deleteColumnStatisticsForTable("db1", "plain", "id");
|
||||
glueService.deleteColumnStatisticsForTable("db1", "plain", "id");
|
||||
|
||||
GlueService.ColumnStatisticsResult fetched =
|
||||
glueService.getColumnStatisticsForTable("db1", "plain", List.of("id"));
|
||||
assertTrue(fetched.columnStatisticsList().isEmpty());
|
||||
assertEquals(1, fetched.errors().size());
|
||||
assertEquals("EntityNotFoundException", fetched.errors().getFirst().error().errorCode());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getColumnStatisticsReportsMissingColumns() {
|
||||
Table table = new Table();
|
||||
|
||||
Reference in new issue
Block a user