You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "jonvex (via GitHub)" <gi...@apache.org> on 2024/08/20 15:15:21 UTC

[PR] [HUDI-8106] Use the new filegroup reader for the metadata table [hudi]

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

   ### Change Logs
   
   use new fg reader for mdt
   
   ### Impact
   
   transition to fg reader for more use cases
   
   ### Risk level (write none, low medium or high below)
   
   medium
   need to test more
   
   ### Documentation Update
   
   N/A
   
   ### 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


Re: [PR] [HUDI-8106] Use the new filegroup reader for the metadata table [hudi]

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


##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/AvroConversionUtils.scala:
##########
@@ -230,12 +230,23 @@ object AvroConversionUtils {
   private def resolveUnion(schema: Schema, dataType: DataType): (Schema, Boolean) = {
     val innerFields = schema.getTypes.asScala
     val containsNullSchema = innerFields.foldLeft(false)((nullFieldEncountered, schema) => nullFieldEncountered | schema.getType == Schema.Type.NULL)
-    (if (containsNullSchema) {
-      Schema.createUnion((List(Schema.create(Schema.Type.NULL)) ++ innerFields.filter(innerSchema => !(innerSchema.getType == Schema.Type.NULL))
-        .map(innerSchema => getAvroSchemaWithDefaults(innerSchema, dataType))).asJava)
-    } else {
-      Schema.createUnion(schema.getTypes.asScala.map(innerSchema => getAvroSchemaWithDefaults(innerSchema, dataType)).asJava)
-    }, containsNullSchema)
+    dataType match {

Review Comment:
   kinda. It's because in the mdt we have a union of a bunch of different types, but otherwise, we expect union to only be 2 types with one of them being null. This is spark specific because this code is for converting spark schemas, but we will probably have an issue like this if other engines use a different schema than avro



-- 
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] [HUDI-8106] Use the new filegroup reader for the metadata table [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=113",
       "triggerID" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * db689739ce1e5e0aa2e430cc9f1709e74c563d37 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=113) 
   
   <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] [HUDI-8106] Use the new filegroup reader for the metadata table [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=113",
       "triggerID" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "triggerType" : "PUSH"
     }, {
       "hash" : "99debf3435015130f3b264622547788e1d66f563",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "99debf3435015130f3b264622547788e1d66f563",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * db689739ce1e5e0aa2e430cc9f1709e74c563d37 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=113) 
   * 99debf3435015130f3b264622547788e1d66f563 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] [HUDI-8106] Use the new filegroup reader for the metadata table [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=113",
       "triggerID" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "triggerType" : "PUSH"
     }, {
       "hash" : "99debf3435015130f3b264622547788e1d66f563",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=117",
       "triggerID" : "99debf3435015130f3b264622547788e1d66f563",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1ccf0f8660a8c54dd4f7920f828900b96f566785",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=124",
       "triggerID" : "1ccf0f8660a8c54dd4f7920f828900b96f566785",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 99debf3435015130f3b264622547788e1d66f563 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=117) 
   * 1ccf0f8660a8c54dd4f7920f828900b96f566785 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=124) 
   
   <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] [HUDI-8106] Use the new filegroup reader for the metadata table [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=113",
       "triggerID" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "triggerType" : "PUSH"
     }, {
       "hash" : "99debf3435015130f3b264622547788e1d66f563",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=117",
       "triggerID" : "99debf3435015130f3b264622547788e1d66f563",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * db689739ce1e5e0aa2e430cc9f1709e74c563d37 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=113) 
   * 99debf3435015130f3b264622547788e1d66f563 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=117) 
   
   <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] [HUDI-8106] Use the new filegroup reader for the metadata table [hudi]

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


##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/AvroConversionUtils.scala:
##########
@@ -230,12 +230,23 @@ object AvroConversionUtils {
   private def resolveUnion(schema: Schema, dataType: DataType): (Schema, Boolean) = {
     val innerFields = schema.getTypes.asScala
     val containsNullSchema = innerFields.foldLeft(false)((nullFieldEncountered, schema) => nullFieldEncountered | schema.getType == Schema.Type.NULL)
-    (if (containsNullSchema) {
-      Schema.createUnion((List(Schema.create(Schema.Type.NULL)) ++ innerFields.filter(innerSchema => !(innerSchema.getType == Schema.Type.NULL))
-        .map(innerSchema => getAvroSchemaWithDefaults(innerSchema, dataType))).asJava)
-    } else {
-      Schema.createUnion(schema.getTypes.asScala.map(innerSchema => getAvroSchemaWithDefaults(innerSchema, dataType)).asJava)
-    }, containsNullSchema)
+    dataType match {

Review Comment:
   Is this change Spark specific?



-- 
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] [HUDI-8106] Use the new filegroup reader for the metadata table [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * db689739ce1e5e0aa2e430cc9f1709e74c563d37 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] [HUDI-8106] Use the new filegroup reader for the metadata table [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=113",
       "triggerID" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "triggerType" : "PUSH"
     }, {
       "hash" : "99debf3435015130f3b264622547788e1d66f563",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=117",
       "triggerID" : "99debf3435015130f3b264622547788e1d66f563",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1ccf0f8660a8c54dd4f7920f828900b96f566785",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1ccf0f8660a8c54dd4f7920f828900b96f566785",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 99debf3435015130f3b264622547788e1d66f563 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=117) 
   * 1ccf0f8660a8c54dd4f7920f828900b96f566785 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] [HUDI-8106] Use the new filegroup reader for the metadata table [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=113",
       "triggerID" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * db689739ce1e5e0aa2e430cc9f1709e74c563d37 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=113) 
   
   <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] [HUDI-8106] Use the new filegroup reader for the metadata table [hudi]

Posted by "jonvex (via GitHub)" <gi...@apache.org>.
jonvex closed pull request #11802: [HUDI-8106] Use the new filegroup reader for the metadata table
URL: https://github.com/apache/hudi/pull/11802


-- 
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] [HUDI-8106] Use the new filegroup reader for the metadata table [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=113",
       "triggerID" : "db689739ce1e5e0aa2e430cc9f1709e74c563d37",
       "triggerType" : "PUSH"
     }, {
       "hash" : "99debf3435015130f3b264622547788e1d66f563",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=117",
       "triggerID" : "99debf3435015130f3b264622547788e1d66f563",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 99debf3435015130f3b264622547788e1d66f563 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=117) 
   
   <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] [HUDI-8106] Use the new filegroup reader for the metadata table [hudi]

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

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