Skip to content

Commit

Permalink
fix hive format
Browse files Browse the repository at this point in the history
  • Loading branch information
XBaith committed Dec 7, 2024
1 parent fbfb6fb commit 2eb3451
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ private void testKeyedPartitionLevel() {
CloseableIterable<TableFileScanHelper.FileScanResult> scan = buildKeyedFileScanHelper().scan();
assertScanResult(scan, 4, 0);

// expire partitions that order than 2022-01-02 18:00:00.000
DataExpirationConfig config = parseDataExpirationConfig(keyedTable);
getMaintainerAndExpire(config, "2022-01-03T18:00:00.000");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@
import org.apache.amoro.hive.catalog.HiveCatalogTestHelper;
import org.apache.amoro.hive.catalog.HiveTableTestHelper;
import org.apache.amoro.io.MixedDataTestHelpers;
import org.apache.amoro.shade.guava32.com.google.common.collect.ImmutableMap;
import org.apache.amoro.table.TableProperties;
import org.apache.iceberg.data.Record;
import org.junit.ClassRule;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

import java.math.BigDecimal;
import java.util.Map;

@RunWith(Parameterized.class)
public class TestDataExpireHive extends TestDataExpire {

@ClassRule public static TestHMS TEST_HMS = new TestHMS();
Expand Down Expand Up @@ -75,4 +76,11 @@ protected Record createRecord(int id, String name, long ts, String opTime) {
new BigDecimal("0"),
opTime.substring(0, 10));
}

protected static Map<String, String> getDefaultProp() {
return ImmutableMap.of(
TableProperties.ENABLE_DATA_EXPIRATION, "true",
TableProperties.DATA_EXPIRATION_FIELD, "op_time_day",
TableProperties.DATA_EXPIRATION_RETENTION_TIME, "1d");
}
}

0 comments on commit 2eb3451

Please sign in to comment.