Search in sources :

Example 1 with DeleteFiles

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");
}
Also used : DeleteFiles(org.apache.iceberg.DeleteFiles)

Aggregations

DeleteFiles (org.apache.iceberg.DeleteFiles)1