You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "the-other-tim-brown (via GitHub)" <gi...@apache.org> on 2025/12/23 20:28:12 UTC

[PR] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

the-other-tim-brown opened a new pull request, #17691:
URL: https://github.com/apache/hudi/pull/17691

   ### Describe the issue this Pull Request addresses
   
   <!-- Either describe the issue inline here with motivation behind the changes 
        (or) link to an issue by including `Closes #<issue-number>` for context. 
        If this PR includes changes to the storage format, public APIs,
        or has breaking changes, use `!` (e.g., feat!: ...) -->
   Closes https://github.com/apache/hudi/issues/17690
   Migrates the clustering paths in our write clients to use the HoodieSchema instead of the Avro Schema class
   
   ### Summary and Changelog
   
   <!-- Short, plain-English summary of what users gain or what changed in behavior.
        Followed by a detailed log of all the changes. Highlight if any code was copied. -->
   - Updates the execution strategies to take in HoodieSchema
   - Various sorting utils are updated to take in the HoodieSchema
   - Minor cleanup in existing tests
   
   ### Impact
   
   <!-- Describe any public API or user-facing feature change or any performance impact. -->
   Migrates more of the writer path to use the new HoodieSchema so we can adopt our own type system
   
   ### Risk Level
   
   <!-- Accepted values: none, low, medium or high. Other than `none`, explain the risk.
        If medium or high, explain what verification was done to mitigate the risks. -->
   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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10552",
       "triggerID" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a87f0f6867b6579d99fcb42c7113ec96aee2dcfc Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10552) 
   
   <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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10491",
       "triggerID" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e4e109689b46f051e767306c55b298a28e6c388",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10523",
       "triggerID" : "8e4e109689b46f051e767306c55b298a28e6c388",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10552",
       "triggerID" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a87f0f6867b6579d99fcb42c7113ec96aee2dcfc Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10552) 
   
   <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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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


##########
hudi-common/src/main/java/org/apache/hudi/common/util/CommitUtils.java:
##########
@@ -49,7 +50,7 @@
 public class CommitUtils {
 
   private static final Logger LOG = LoggerFactory.getLogger(CommitUtils.class);
-  private static final String NULL_SCHEMA_STR = Schema.create(Schema.Type.NULL).toString();
+  private static final String NULL_SCHEMA_STR = HoodieSchema.create(HoodieSchemaType.NULL).toString();

Review Comment:
   `HoodieSchema.create(HoodieSchemaType.NULL)` seems to be used in quite a few places, possible to just make this a public constant somewhere where we can just import this to the other relevant classes?



-- 
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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10566",
       "triggerID" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "triggerType" : "PUSH"
     }, {
       "hash" : "15896c5a4dfa87f89740e4b2d4c78c0f22c3b2fa",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10585",
       "triggerID" : "15896c5a4dfa87f89740e4b2d4c78c0f22c3b2fa",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a87f0f6867b6579d99fcb42c7113ec96aee2dcfc Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10566) 
   * 15896c5a4dfa87f89740e4b2d4c78c0f22c3b2fa Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10585) 
   
   <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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10491",
       "triggerID" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a9cdaaa9a7748eed43104a967c05a9b0a4157804 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10491) 
   
   <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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10566",
       "triggerID" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "triggerType" : "PUSH"
     }, {
       "hash" : "15896c5a4dfa87f89740e4b2d4c78c0f22c3b2fa",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10585",
       "triggerID" : "15896c5a4dfa87f89740e4b2d4c78c0f22c3b2fa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ff6538099ab0229d8222baeb949aeb532d3c27d4",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10588",
       "triggerID" : "ff6538099ab0229d8222baeb949aeb532d3c27d4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 15896c5a4dfa87f89740e4b2d4c78c0f22c3b2fa Azure: [CANCELED](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10585) 
   * ff6538099ab0229d8222baeb949aeb532d3c27d4 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10588) 
   
   <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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10491",
       "triggerID" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e4e109689b46f051e767306c55b298a28e6c388",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10523",
       "triggerID" : "8e4e109689b46f051e767306c55b298a28e6c388",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8e4e109689b46f051e767306c55b298a28e6c388 Azure: [CANCELED](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10523) 
   * a87f0f6867b6579d99fcb42c7113ec96aee2dcfc 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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10566",
       "triggerID" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "triggerType" : "PUSH"
     }, {
       "hash" : "15896c5a4dfa87f89740e4b2d4c78c0f22c3b2fa",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10585",
       "triggerID" : "15896c5a4dfa87f89740e4b2d4c78c0f22c3b2fa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ff6538099ab0229d8222baeb949aeb532d3c27d4",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "ff6538099ab0229d8222baeb949aeb532d3c27d4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 15896c5a4dfa87f89740e4b2d4c78c0f22c3b2fa Azure: [CANCELED](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10585) 
   * ff6538099ab0229d8222baeb949aeb532d3c27d4 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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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


-- 
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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10552",
       "triggerID" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a87f0f6867b6579d99fcb42c7113ec96aee2dcfc Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10552) 
   
   <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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10491",
       "triggerID" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e4e109689b46f051e767306c55b298a28e6c388",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10523",
       "triggerID" : "8e4e109689b46f051e767306c55b298a28e6c388",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10552",
       "triggerID" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8e4e109689b46f051e767306c55b298a28e6c388 Azure: [CANCELED](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10523) 
   * a87f0f6867b6579d99fcb42c7113ec96aee2dcfc Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10552) 
   
   <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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10491",
       "triggerID" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e4e109689b46f051e767306c55b298a28e6c388",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10523",
       "triggerID" : "8e4e109689b46f051e767306c55b298a28e6c388",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8e4e109689b46f051e767306c55b298a28e6c388 Azure: [CANCELED](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10523) 
   
   <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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10566",
       "triggerID" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a87f0f6867b6579d99fcb42c7113ec96aee2dcfc Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10566) 
   
   <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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a9cdaaa9a7748eed43104a967c05a9b0a4157804 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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10491",
       "triggerID" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e4e109689b46f051e767306c55b298a28e6c388",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "8e4e109689b46f051e767306c55b298a28e6c388",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a9cdaaa9a7748eed43104a967c05a9b0a4157804 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10491) 
   * 8e4e109689b46f051e767306c55b298a28e6c388 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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

Posted by "the-other-tim-brown (via GitHub)" <gi...@apache.org>.
the-other-tim-brown commented on code in PR #17691:
URL: https://github.com/apache/hudi/pull/17691#discussion_r2646030388


##########
hudi-common/src/main/java/org/apache/hudi/common/util/CommitUtils.java:
##########
@@ -49,7 +50,7 @@
 public class CommitUtils {
 
   private static final Logger LOG = LoggerFactory.getLogger(CommitUtils.class);
-  private static final String NULL_SCHEMA_STR = Schema.create(Schema.Type.NULL).toString();
+  private static final String NULL_SCHEMA_STR = HoodieSchema.create(HoodieSchemaType.NULL).toString();

Review Comment:
   Adding one now



-- 
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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a87f0f6867b6579d99fcb42c7113ec96aee2dcfc 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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10566",
       "triggerID" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "triggerType" : "PUSH"
     }, {
       "hash" : "15896c5a4dfa87f89740e4b2d4c78c0f22c3b2fa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10585",
       "triggerID" : "15896c5a4dfa87f89740e4b2d4c78c0f22c3b2fa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ff6538099ab0229d8222baeb949aeb532d3c27d4",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10588",
       "triggerID" : "ff6538099ab0229d8222baeb949aeb532d3c27d4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ff6538099ab0229d8222baeb949aeb532d3c27d4 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10588) 
   
   <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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a87f0f6867b6579d99fcb42c7113ec96aee2dcfc 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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10566",
       "triggerID" : "a87f0f6867b6579d99fcb42c7113ec96aee2dcfc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a87f0f6867b6579d99fcb42c7113ec96aee2dcfc Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10566) 
   
   <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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10491",
       "triggerID" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8e4e109689b46f051e767306c55b298a28e6c388",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10523",
       "triggerID" : "8e4e109689b46f051e767306c55b298a28e6c388",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a9cdaaa9a7748eed43104a967c05a9b0a4157804 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10491) 
   * 8e4e109689b46f051e767306c55b298a28e6c388 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10523) 
   
   <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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10491",
       "triggerID" : "a9cdaaa9a7748eed43104a967c05a9b0a4157804",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a9cdaaa9a7748eed43104a967c05a9b0a4157804 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10491) 
   
   <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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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


##########
hudi-common/src/test/java/org/apache/hudi/common/util/TestSortUtils.java:
##########
@@ -77,7 +78,7 @@ record = new HoodieAvroRecord(new HoodieKey("record1", "partition1"), payload);
       record = new TestSparkRecord(new HoodieKey("record1", "partition1"), payload);
     }
     String[] userSortColumns = new String[] {"non_pii_col", "timestamp"};
-    FlatLists.ComparableList<Comparable<HoodieRecord>> comparableList = SortUtils.getComparableSortColumns(record, userSortColumns, Schema.parse(SCHEMA), suffixRecordKey, true);
+    FlatLists.ComparableList<Comparable<HoodieRecord>> comparableList = SortUtils.getComparableSortColumns(record, userSortColumns, HoodieSchema.parse(SCHEMA), suffixRecordKey, true);

Review Comment:
   Nit: We can use HoodieSchema to parse the `SCHEMA` string to a `HoodieSchema`, after which, we can remove the importation of `org.apache.avro.Schema`.



##########
hudi-common/src/main/java/org/apache/hudi/common/util/CommitUtils.java:
##########
@@ -49,7 +50,7 @@
 public class CommitUtils {
 
   private static final Logger LOG = LoggerFactory.getLogger(CommitUtils.class);
-  private static final String NULL_SCHEMA_STR = Schema.create(Schema.Type.NULL).toString();
+  private static final String NULL_SCHEMA_STR = HoodieSchema.create(HoodieSchemaType.NULL).toString();

Review Comment:
   `HoodieSchema.create(HoodieSchemaType.NULL)` seems to be used in quite a few places, possible for us to just make this a public constant somewhere where we can just import this to the other relevant classes?



-- 
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] feat(schema): Migrate clustering operations to use HoodieSchema [hudi]

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

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