lszskye opened a new pull request, #79:
URL: https://github.com/apache/paimon-cpp/pull/79

   ## feat: add type casting infrastructure for schema evolution
   
   ### Changes
   
   #### `CastExecutor`
   - Abstract interface for casting data between different Paimon types. 
Supports both single-value casting (Literal-level) and batch casting (Arrow 
Array-level).
   
   #### `CastExecutorFactory`
   - Singleton factory that manages a registry of `CastExecutor` instances 
indexed by `(source type, target type)` pairs. Resolves the appropriate 
executor for any supported type conversion.
   
   #### `CastedRow`
   - An `InternalRow` implementation that wraps an underlying row and applies 
type casting on-the-fly during field access. Reads data according to source 
field types and casts to target field types using per-field `CastExecutor` 
instances. Used in schema evolution scenarios where the stored data type 
differs from the read schema.
   
   #### `CastingUtils`
   - Static utility for performing Arrow Compute-based type casts on arrays and 
scalars. Includes integer overflow detection for casted literals and templated 
scalar casting with configurable `CastOptions`.
   
   #### `NumericPrimitiveCastExecutor`
   - `CastExecutor` implementation for numeric primitive type conversions 
(TINYINT, SMALLINT, INT, BIGINT, FLOAT, DOUBLE). Uses a dispatch map indexed by 
`(source FieldType, target FieldType)` pairs for literal casting, and delegates 
to Arrow Compute for array-level batch casting.
   
   ### Tests
   
   - `CastExecutorFactoryTest`
   - `CastedRowTest`
   - `CastingUtilsTest`


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