1
0

[MINOR] Fix table type in input format test (#4912)

This commit is contained in:
Sagar Sumit
2022-02-26 00:21:53 +05:30
committed by GitHub
parent 92cdc5987a
commit 6a5cfb45b9
2 changed files with 3 additions and 3 deletions

View File

@@ -104,7 +104,7 @@ public class TestHoodieCombineHiveInputFormat extends HoodieCommonTestHarness {
final int numRecords = 1000;
// Create 3 partitions, each partition holds one parquet file and 1000 records
List<File> partitionDirs = InputFormatTestUtil
.prepareMultiPartitionedParquetTable(tempDir, schema, 3, numRecords, commitTime);
.prepareMultiPartitionedParquetTable(tempDir, schema, 3, numRecords, commitTime, HoodieTableType.MERGE_ON_READ);
InputFormatTestUtil.commit(tempDir, commitTime);
TableDesc tblDesc = Utilities.defaultTd;

View File

@@ -246,9 +246,9 @@ public class InputFormatTestUtil {
}
public static List<File> prepareMultiPartitionedParquetTable(java.nio.file.Path basePath, Schema schema,
int numberPartitions, int numberOfRecordsPerPartition, String commitNumber) throws IOException {
int numberPartitions, int numberOfRecordsPerPartition, String commitNumber, HoodieTableType tableType) throws IOException {
List<File> result = new ArrayList<>();
HoodieTestUtils.init(HoodieTestUtils.getDefaultHadoopConf(), basePath.toString());
HoodieTestUtils.init(HoodieTestUtils.getDefaultHadoopConf(), basePath.toString(), tableType, HoodieFileFormat.PARQUET);
for (int i = 0; i < numberPartitions; i++) {
java.nio.file.Path partitionPath = basePath.resolve(Paths.get(2016 + i + "", "05", "01"));
setupPartition(basePath, partitionPath);