You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/06/28 10:29:15 UTC

[GitHub] [hudi] danny0405 commented on a change in pull request #3171: [HUDI-2088] Missing Partition Fields And PreCombineField In Hoodie Pr…

danny0405 commented on a change in pull request #3171:
URL: https://github.com/apache/hudi/pull/3171#discussion_r659666979



##########
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:
       Inline these 2 variables, does the default partition path (empty string) works here ?

##########
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:
       Why put the tests here ?




-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org