You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2023/08/05 04:03:54 UTC

[GitHub] [hudi] danny0405 opened a new pull request, #9370: [HUDI-6650] Do not set default preCombine field for Flink table config

danny0405 opened a new pull request, #9370:
URL: https://github.com/apache/hudi/pull/9370

   ### Change Logs
   
   Do not set preCombine field when use does not set it up explicitly. This behavior is kept in line with Spark.
   
   ### Impact
   
   none.
   
   ### Risk level (write none, low medium or high below)
   
   none
   
   ### Documentation Update
   
   _Describe any necessary documentation update if there is any new feature, config, or user-facing change_
   
   - _The config description must be updated if new configs are added or the default value of the configs are changed_
   - _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
     ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make
     changes to the website._
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


-- 
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


[GitHub] [hudi] danny0405 closed pull request #9370: [HUDI-6650] Do not set default preCombine field for Flink table config

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 closed pull request #9370: [HUDI-6650] Do not set default preCombine field for Flink table config
URL: https://github.com/apache/hudi/pull/9370


-- 
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


[GitHub] [hudi] hudi-bot commented on pull request #9370: [HUDI-6650] Do not set default preCombine field for Flink table config

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9370:
URL: https://github.com/apache/hudi/pull/9370#issuecomment-1666389367

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "241f148dd3740636568416a5f7d37a9cd329e951",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19099",
       "triggerID" : "241f148dd3740636568416a5f7d37a9cd329e951",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 241f148dd3740636568416a5f7d37a9cd329e951 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19099) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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


[GitHub] [hudi] danny0405 commented on pull request #9370: [HUDI-6650] Do not set default preCombine field for Flink table config

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on PR #9370:
URL: https://github.com/apache/hudi/pull/9370#issuecomment-1666486193

   Thanks @codope , I think through it again, we may no need this fix, when the user does not set a preCombine key, the code in `HoodieTableFactory#checkPreCombineKey` would set the field as a constant `NO_PRECOMBINE`, then when initializing the table, the field can be set up correctly as null.


-- 
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


[GitHub] [hudi] hudi-bot commented on pull request #9370: [HUDI-6650] Do not set default preCombine field for Flink table config

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9370:
URL: https://github.com/apache/hudi/pull/9370#issuecomment-1666387643

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "241f148dd3740636568416a5f7d37a9cd329e951",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "241f148dd3740636568416a5f7d37a9cd329e951",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 241f148dd3740636568416a5f7d37a9cd329e951 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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


[GitHub] [hudi] hudi-bot commented on pull request #9370: [HUDI-6650] Do not set default preCombine field for Flink table config

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9370:
URL: https://github.com/apache/hudi/pull/9370#issuecomment-1666467702

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "241f148dd3740636568416a5f7d37a9cd329e951",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19099",
       "triggerID" : "241f148dd3740636568416a5f7d37a9cd329e951",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 241f148dd3740636568416a5f7d37a9cd329e951 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19099) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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


[GitHub] [hudi] codope commented on a diff in pull request #9370: [HUDI-6650] Do not set default preCombine field for Flink table config

Posted by "codope (via GitHub)" <gi...@apache.org>.
codope commented on code in PR #9370:
URL: https://github.com/apache/hudi/pull/9370#discussion_r1284971137


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/configuration/OptionsResolver.java:
##########
@@ -126,6 +126,17 @@ public static String getPreCombineField(Configuration conf) {
     return preCombineField.equals(FlinkOptions.NO_PRE_COMBINE) ? null : preCombineField;
   }
 
+  /**
+   * Returns the preCombine field
+   * or null if the value is set as {@link FlinkOptions#NO_PRE_COMBINE} or the user does not config it explicitly.
+   */
+  public static String getPreCombineFieldNoDefaultValue(Configuration conf) {
+    if (!conf.contains(FlinkOptions.PRECOMBINE_FIELD)) {
+      return null;

Review Comment:
   Better to return Option<String>?



-- 
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


[GitHub] [hudi] codope commented on a diff in pull request #9370: [HUDI-6650] Do not set default preCombine field for Flink table config

Posted by "codope (via GitHub)" <gi...@apache.org>.
codope commented on code in PR #9370:
URL: https://github.com/apache/hudi/pull/9370#discussion_r1284971137


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/configuration/OptionsResolver.java:
##########
@@ -126,6 +126,17 @@ public static String getPreCombineField(Configuration conf) {
     return preCombineField.equals(FlinkOptions.NO_PRE_COMBINE) ? null : preCombineField;
   }
 
+  /**
+   * Returns the preCombine field
+   * or null if the value is set as {@link FlinkOptions#NO_PRE_COMBINE} or the user does not config it explicitly.
+   */
+  public static String getPreCombineFieldNoDefaultValue(Configuration conf) {
+    if (!conf.contains(FlinkOptions.PRECOMBINE_FIELD)) {
+      return null;

Review Comment:
   Better to return `Option<String>`?



-- 
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