HuaHuaY commented on PR #48763:
URL: https://github.com/apache/arrow/pull/48763#issuecomment-3748982670

   > > I think that what you need is `TypeTraits` but not `CTypeTraits`
   > 
   > Hi @HuaHuaY , this issue is specifically for `CTypeTraits` which are now 
missing for certain types (mostly Decimals).
   
   Yeah. I found that you opened the issue. But I think that this PR is 
implementing types' `TypeTraits` instead of `CTypeTraits`. You can check the 
code around line 354 is similar to this PR.
   ```cpp
   template <>
   struct TypeTraits<Decimal128Type> {
     using ArrayType = Decimal128Array;
     using BuilderType = Decimal128Builder;
     using ScalarType = Decimal128Scalar;
     using CType = Decimal128;
     constexpr static bool is_parameter_free = false;
   };
   
   template <>
   struct TypeTraits<Decimal256Type> {
     using ArrayType = Decimal256Array;
     using BuilderType = Decimal256Builder;
     using ScalarType = Decimal256Scalar;
     using CType = Decimal256;
     constexpr static bool is_parameter_free = false;
   };
   ```
   I guess that there should not be `CType` in `CTypeTraits` and we may need 
these code instead:
   ```cpp
   template <>
   struct CTypeTraits<Decimal128Type::CType> {
     using ArrowType = Decimal128Type;
   };
   
   template <>
   struct CTypeTraits<Decimal256Type::CType> {
     using ArrowType = Decimal256Type;
   };
   ```
   


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