[HUDI-4171] Fixing Non partitioned with virtual keys in read path (#5747)
- When Non partitioned key gen is used with virtual keys, read path could break since partition path may not exist.
This commit is contained in:
committed by
GitHub
parent
21b903fddb
commit
7da97c8096
@@ -103,10 +103,19 @@ public class HoodieTestUtils {
|
||||
}
|
||||
|
||||
public static HoodieTableMetaClient init(Configuration hadoopConf, String basePath, HoodieTableType tableType,
|
||||
HoodieFileFormat baseFileFormat)
|
||||
HoodieFileFormat baseFileFormat) throws IOException {
|
||||
return init(hadoopConf, basePath, tableType, baseFileFormat, false, null, true);
|
||||
}
|
||||
|
||||
public static HoodieTableMetaClient init(Configuration hadoopConf, String basePath, HoodieTableType tableType,
|
||||
HoodieFileFormat baseFileFormat, boolean setKeyGen, String keyGenerator, boolean populateMetaFields)
|
||||
throws IOException {
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty(HoodieTableConfig.BASE_FILE_FORMAT.key(), baseFileFormat.toString());
|
||||
if (setKeyGen) {
|
||||
properties.setProperty("hoodie.datasource.write.keygenerator.class", keyGenerator);
|
||||
}
|
||||
properties.setProperty("hoodie.populate.meta.fields", Boolean.toString(populateMetaFields));
|
||||
return init(hadoopConf, basePath, tableType, properties);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user