pengzhiwei2018 commented on a change in pull request #3171:
URL: https://github.com/apache/hudi/pull/3171#discussion_r659725568
##########
File path: hudi-flink/src/main/java/org/apache/hudi/util/StreamerUtil.java
##########
@@ -205,10 +205,14 @@ public static void initTableIfNotExists(Configuration
conf) throws IOException {
// Hadoop FileSystem
FileSystem fs = FSUtils.getFs(basePath, hadoopConf);
if (!fs.exists(new Path(basePath, HoodieTableMetaClient.METAFOLDER_NAME)))
{
+ String partitionField =
conf.getString(FlinkOptions.PARTITION_PATH_FIELD, null);
+ String preCombineField = conf.getString(FlinkOptions.PRECOMBINE_FIELD);
Review comment:
No, the empty partition field name would not work.
##########
File path:
hudi-flink/src/test/java/org/apache/hudi/table/HoodieDataSourceITCase.java
##########
@@ -333,6 +336,16 @@ void testWriteAndReadParMiddle(ExecMode execMode) throws
Exception {
execInsertSql(streamTableEnv, insertInto);
List<Row> result2 = execSelectSql(streamTableEnv, "select * from t1",
execMode);
assertRowsEquals(result2, expected);
+ // Validate the partition fields & preCombineField in hoodie.properties.
+ HoodieTableMetaClient metaClient = HoodieTableMetaClient.builder()
+ .setBasePath(tempFile.getAbsolutePath())
+ .setConf(new org.apache.hadoop.conf.Configuration())
Review comment:
em, I will add an independent test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]