You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "prashantwason (via GitHub)" <gi...@apache.org> on 2026/02/04 22:19:30 UTC

[PR] fix(flink): Handle Non-Null Complex Types with Nullable Elements in ParquetSchemaConverter [hudi]

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

   ### Describe the issue this Pull Request addresses
   
   This PR fixes an issue in `ParquetSchemaConverter` where complex types (MAP and ROW) with non-null containers but nullable elements were not correctly setting the repetition type for nested elements. 
   
   For example, `Array<Row<int a, string b> NOT NULL> NOT NULL` should create a repeated **required** group with optional elements `a` and `b` (nullable), but the previous implementation was passing the parent's repetition to nested elements instead of checking each element's nullability.
   
   ### Summary and Changelog
   
   **Summary:** Fix ParquetSchemaConverter to correctly handle nullability for nested elements in MAP and ROW types.
   
   **Changelog:**
   - Fix MAP case: Use `valueType.isNullable()` to determine value repetition instead of inheriting parent's repetition
   - Fix ROW case: Use `field.getType().isNullable()` to determine field repetition instead of inheriting parent's repetition  
   - Add `testConvertNestedComplexTypes()` test to verify nested complex type handling with mixed nullability
   - Update `testConvertComplexTypes()` to test non-null array elements
   
   ### Impact
   
   This change affects Parquet schema generation for Flink tables with complex nested types. Tables with non-null complex types containing nullable elements will now generate correct Parquet schemas with proper required/optional annotations.
   
   ### Risk Level
   
   Low - This is a targeted fix to the Parquet schema converter for Flink. The change only affects how nullability is propagated for nested types in MAP and ROW. The ARRAY case was already fixed previously in the codebase.
   
   ### Documentation Update
   
   None - This is a bug fix with no new configs or user-facing feature changes.
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Enough context is provided in the sections above
   - [x] 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] fix(flink): Handle Non-Null Complex Types with Nullable Elements in ParquetSchemaConverter [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56ca3f77421e82f747f310db5f28b23135c06ae5",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11669",
       "triggerID" : "56ca3f77421e82f747f310db5f28b23135c06ae5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56ca3f77421e82f747f310db5f28b23135c06ae5 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11669) 
   
   <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] fix(flink): Handle Non-Null Complex Types with Nullable Elements in ParquetSchemaConverter [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56ca3f77421e82f747f310db5f28b23135c06ae5",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11669",
       "triggerID" : "56ca3f77421e82f747f310db5f28b23135c06ae5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56ca3f77421e82f747f310db5f28b23135c06ae5 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11669) 
   
   <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] fix(flink): Handle Non-Null Complex Types with Nullable Elements in ParquetSchemaConverter [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "56ca3f77421e82f747f310db5f28b23135c06ae5",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "56ca3f77421e82f747f310db5f28b23135c06ae5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 56ca3f77421e82f747f310db5f28b23135c06ae5 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] fix(flink): Handle Non-Null Complex Types with Nullable Elements in ParquetSchemaConverter [hudi]

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


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