lxy-9602 opened a new pull request, #176:
URL: https://github.com/apache/paimon-cpp/pull/176

   <!-- PR titles must follow Conventional Commits: <type>(<optional-scope>): 
<description> -->
   
   ### Purpose
   
   <!-- Linking this pull request to the issue -->
   No Linked issue.
   
   This PR restores nullable MAP-key schema compatibility that was removed by
   [alibaba/paimon-cpp#226](https://github.com/alibaba/paimon-cpp/pull/226).
   
   The changes:
   
   - Accept nullable MAP key declarations when parsing existing Paimon schemas.
   - Normalize parsed MAP key fields to non-nullable Arrow fields because 
Apache Arrow does not support nullable MAP keys.
   - Remove the general schema validation requiring MAP keys to be explicitly 
declared as `NOT NULL`.
   - Continue rejecting nullable MAP keys for the shared-shredding storage 
layout.
   - Validate Arrow arrays at the ORC and Parquet format-reader boundaries so 
data containing an actual null MAP key returns `Status::Invalid` instead of 
triggering an Arrow abort.
   - Restore nullable MAP key declarations in existing test schemas.
   
   
   <!-- What is the purpose of the change -->
   
   ### Tests
   
   Added or updated coverage for:
   
   - Parsing a nullable MAP key declaration and normalizing it for Arrow.
   - Creating table schemas containing nullable MAP key declarations.
   - Rejecting nullable MAP keys when shared-shredding is enabled.
   - Reading the nullable-MAP-key ORC fixture with `read.batch.size=1`:
     - The first two rows are read and verified successfully.
     - The third row returns `Map array keys array should have no nulls`.
     
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   Schema compatibility is relaxed so existing schemas may declare nullable MAP 
keys. An error is returned only when the physical data actually contains a null 
MAP key. Shared-shredding continues to require non-nullable MAP keys.
   
   <!-- Does this change affect API in include dir or storage format or 
protocol -->
   
   ### Documentation
   Updated the data type and schema documentation to describe nullable MAP key 
compatibility and read-time validation behavior.
   
   <!-- Does this change introduce a new feature -->
   
   ### Generative AI tooling
   Generated-by: OpenAI Codex (GPT-5)
   <!--
   If generative AI tooling has been used in the process of authoring this 
patch, please include the
   phrase: 'Generated-by: ' followed by the name of the tool and its version.
   If no, write 'No'.
   Please refer to the [ASF Generative Tooling 
Guidance](https://www.apache.org/legal/generative-tooling.html) for 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to