dimas-b commented on code in PR #8382:
URL: https://github.com/apache/iceberg/pull/8382#discussion_r1324749071
##########
nessie/src/test/java/org/apache/iceberg/nessie/TestNessieTable.java:
##########
@@ -589,18 +591,43 @@ public void testGCEnabled() {
}
@Test
- public void testTableMetadataFilesCleanupDisable() throws
NessieNotFoundException {
+ public void testGCEnabled() {
Table icebergTable = catalog.loadTable(TABLE_IDENTIFIER);
+ icebergTable.updateProperties().set(TableProperties.GC_ENABLED,
"true").commit();
+
Assertions.assertThat(icebergTable.properties().get(TableProperties.GC_ENABLED))
+ .isEqualTo("true");
- // Forceful setting of property also should get override with false
- icebergTable
- .updateProperties()
- .set(TableProperties.METADATA_DELETE_AFTER_COMMIT_ENABLED, "true")
- .commit();
- Assertions.assertThat(
-
icebergTable.properties().get(TableProperties.METADATA_DELETE_AFTER_COMMIT_ENABLED))
- .isNotNull()
- .isEqualTo("false");
+ Assertions.assertThatCode(
+ () ->
+
icebergTable.expireSnapshots().expireOlderThan(System.currentTimeMillis()).commit())
+ .doesNotThrowAnyException();
+ }
+
+ @Test
+ public void testGCEnabledViaCatalogProperties() {
Review Comment:
renamed
##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieCatalog.java:
##########
@@ -58,12 +60,18 @@ public class NessieCatalog extends BaseMetastoreCatalog
private static final Logger LOG =
LoggerFactory.getLogger(NessieCatalog.class);
private static final Joiner SLASH = Joiner.on("/");
private static final String NAMESPACE_LOCATION_PROPS = "location";
+
+ private static final Map<String, String> DEFAULT_CATALOG_OPTIONS =
+ ImmutableMap.<String, String>builder()
+ .put(CatalogProperties.TABLE_DEFAULT_PREFIX +
TableProperties.GC_ENABLED, "false")
+ .build();
+
private NessieIcebergClient client;
private String warehouseLocation;
private Object config;
private String name;
private FileIO fileIO;
- private Map<String, String> catalogOptions;
+ @Nonnull private Map<String, String> catalogOptions =
DEFAULT_CATALOG_OPTIONS;
Review Comment:
removed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]