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

   <!-- PR titles must follow Conventional Commits: <type>(<optional-scope>): 
<description> -->
   
   ### Purpose
   
   <!-- Linking this pull request to the issue -->
   Introduce Paimon-owned `checked_cast` and `checked_pointer_cast` helpers 
that delegate to Arrow's debug-checked cast implementation.
   
   This change:
   
   - Replaces direct uses of `arrow::internal::checked_cast` and 
`arrow::internal::checked_pointer_cast`.
   - Replaces class-hierarchy `static_cast` and `std::static_pointer_cast` 
usages with the Paimon helpers where applicable.
   - Validates null pointers and Arrow type IDs before checked casts when a 
type mismatch is a recoverable runtime error.
   - Keeps `dynamic_cast` when cast failure represents an expected runtime 
branch or is handled by an existing null-check macro.
   - Keeps discriminator-guarded `std::static_pointer_cast` for non-polymorphic 
hierarchies such as `parquet::Page`.
   - Documents the checked-cast conventions and exceptions in the code style 
guide.
   
   <!-- What is the purpose of the change -->
   
   ### Tests
   
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   <!-- Does this change affect API in include dir or storage format or 
protocol -->
   
   ### Documentation
   Updated `docs/code-style.md`.
   <!-- 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