use of org.apache.iceberg.DeleteFiles in project hive by apache.
the class HiveIcebergMetaHook method preTruncateTable.
@Override
public void preTruncateTable(org.apache.hadoop.hive.metastore.api.Table table, EnvironmentContext context) throws MetaException {
this.catalogProperties = getCatalogProperties(table);
this.icebergTable = Catalogs.loadTable(conf, catalogProperties);
DeleteFiles delete = icebergTable.newDelete();
delete.deleteFromRowFilter(Expressions.alwaysTrue());
delete.commit();
context.putToProperties("truncateSkipDataDeletion", "true");
}
Aggregations