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

[PR] refactor: Adapt delete handling with DeleteContext for HoodieFlinkRecord [hudi]

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

   ### Describe the issue this Pull Request addresses
   
   Fix issue: https://github.com/apache/hudi/issues/13969
   
   ### Summary and Changelog
   
   Adapt delete handling with `DeleteContext` for `HoodieFlinkRecord`
   
   ### Impact
   
   none.
   
   ### Risk Level
   
   low.
   
   ### Documentation Update
   
   <!-- Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".
   
   - 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 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)
   - [ ] Enough context is provided in the sections above
   - [ ] Adequate tests were added if applicable
   


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


Re: [PR] refactor: Adapt delete handling with DeleteContext for HoodieFlinkRecord [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 merged PR #13971:
URL: https://github.com/apache/hudi/pull/13971


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


Re: [PR] refactor: Adapt delete handling with DeleteContext for HoodieFlinkRecord [hudi]

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


##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/table/format/FlinkRecordContext.java:
##########
@@ -65,6 +68,16 @@ public FlinkRecordContext(HoodieTableConfig tableConfig, StorageConfiguration<?>
     this.utcTimezone = storageConf.getBoolean("read.utc-timezone",true);
   }
 
+  private FlinkRecordContext(boolean utcTimezone) {
+    super(new DefaultJavaTypeConverter());
+    this.utcTimezone = utcTimezone;
+  }
+
+  public static FlinkRecordContext getFieldAccessorInstance(Properties props) {
+    boolean utcTimezone = Boolean.parseBoolean(props.getProperty("read.utc-timezone","true"));
+    return utcTimezone ? FIELD_ACCESSOR_INSTANCE_WITH_UTC_ENABLE : FIELD_ACCESSOR_INSTANCE_WITH_UTC_DISABLE;

Review Comment:
   is the utc-timezone related with the `isDelete` check? otherwise we can just use one context instance 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


Re: [PR] refactor: Adapt delete handling with DeleteContext for HoodieFlinkRecord [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2e4620884b17298865408326b3602c658e988313",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8754",
       "triggerID" : "2e4620884b17298865408326b3602c658e988313",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2e4620884b17298865408326b3602c658e988313 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8754) 
   
   <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


Re: [PR] refactor: Adapt delete handling with DeleteContext for HoodieFlinkRecord [hudi]

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


##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/table/format/FlinkRecordContext.java:
##########
@@ -65,6 +68,16 @@ public FlinkRecordContext(HoodieTableConfig tableConfig, StorageConfiguration<?>
     this.utcTimezone = storageConf.getBoolean("read.utc-timezone",true);
   }
 
+  private FlinkRecordContext(boolean utcTimezone) {
+    super(new DefaultJavaTypeConverter());
+    this.utcTimezone = utcTimezone;
+  }
+
+  public static FlinkRecordContext getFieldAccessorInstance(Properties props) {
+    boolean utcTimezone = Boolean.parseBoolean(props.getProperty("read.utc-timezone","true"));
+    return utcTimezone ? FIELD_ACCESSOR_INSTANCE_WITH_UTC_ENABLE : FIELD_ACCESSOR_INSTANCE_WITH_UTC_DISABLE;

Review Comment:
   `utc-timezone` is only used for field with TIMESTAMP type.
   Considering `isDelete` checking, if we have assumption that custom delete field cannot be of TIMESTAMP type, we can use one instance here. Actually, it's generally of primitive type, like string. I'm ok to use one instance 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


Re: [PR] refactor: Adapt delete handling with DeleteContext for HoodieFlinkRecord [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2e4620884b17298865408326b3602c658e988313",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8754",
       "triggerID" : "2e4620884b17298865408326b3602c658e988313",
       "triggerType" : "PUSH"
     }, {
       "hash" : "56244fe4193cc7c4850d8db3c516a54c90e5c550",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8781",
       "triggerID" : "56244fe4193cc7c4850d8db3c516a54c90e5c550",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2e4620884b17298865408326b3602c658e988313 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8754) 
   * 56244fe4193cc7c4850d8db3c516a54c90e5c550 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8781) 
   
   <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


Re: [PR] refactor: Adapt delete handling with DeleteContext for HoodieFlinkRecord [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2e4620884b17298865408326b3602c658e988313",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8754",
       "triggerID" : "2e4620884b17298865408326b3602c658e988313",
       "triggerType" : "PUSH"
     }, {
       "hash" : "56244fe4193cc7c4850d8db3c516a54c90e5c550",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "56244fe4193cc7c4850d8db3c516a54c90e5c550",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2e4620884b17298865408326b3602c658e988313 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8754) 
   * 56244fe4193cc7c4850d8db3c516a54c90e5c550 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


Re: [PR] refactor: Adapt delete handling with DeleteContext for HoodieFlinkRecord [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2e4620884b17298865408326b3602c658e988313",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8754",
       "triggerID" : "2e4620884b17298865408326b3602c658e988313",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2e4620884b17298865408326b3602c658e988313 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8754) 
   
   <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


Re: [PR] refactor: Adapt delete handling with DeleteContext for HoodieFlinkRecord [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2e4620884b17298865408326b3602c658e988313",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "2e4620884b17298865408326b3602c658e988313",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2e4620884b17298865408326b3602c658e988313 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


Re: [PR] refactor: Adapt delete handling with DeleteContext for HoodieFlinkRecord [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "2e4620884b17298865408326b3602c658e988313",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8754",
       "triggerID" : "2e4620884b17298865408326b3602c658e988313",
       "triggerType" : "PUSH"
     }, {
       "hash" : "56244fe4193cc7c4850d8db3c516a54c90e5c550",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8781",
       "triggerID" : "56244fe4193cc7c4850d8db3c516a54c90e5c550",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56244fe4193cc7c4850d8db3c516a54c90e5c550 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=8781) 
   
   <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