From 0678222faa86111eb3cc2e2ada341bf390231982 Mon Sep 17 00:00:00 2001 From: Naurder <48394023+Naurder@users.noreply.github.com> Date: Wed, 10 Jun 2026 22:41:58 +0200 Subject: [PATCH 1/2] GH-48740: [C++] Add missing CTypeTraits for decimal types --- cpp/src/arrow/type_traits.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cpp/src/arrow/type_traits.h b/cpp/src/arrow/type_traits.h index 1b7a02e1085a..78fb08cd3058 100644 --- a/cpp/src/arrow/type_traits.h +++ b/cpp/src/arrow/type_traits.h @@ -103,6 +103,16 @@ struct CTypeTraits {}; /// \addtogroup type-traits /// @{ +template <> +struct CTypeTraits { + using ArrowType = Decimal128Type; +}; + +template <> +struct CTypeTraits { + using ArrowType = Decimal256Type; +}; + template <> struct TypeTraits { using ArrayType = NullArray; From c1e09556ff41fe7c33ead3135a0a14076134582a Mon Sep 17 00:00:00 2001 From: Naurder <48394023+Naurder@users.noreply.github.com> Date: Thu, 11 Jun 2026 19:15:50 +0200 Subject: [PATCH 2/2] apply reviewer suggestion: inherit from TypeTraits --- cpp/src/arrow/type_traits.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/arrow/type_traits.h b/cpp/src/arrow/type_traits.h index 78fb08cd3058..900c3e05a56b 100644 --- a/cpp/src/arrow/type_traits.h +++ b/cpp/src/arrow/type_traits.h @@ -104,12 +104,12 @@ struct CTypeTraits {}; /// \addtogroup type-traits /// @{ template <> -struct CTypeTraits { +struct CTypeTraits : TypeTraits { using ArrowType = Decimal128Type; }; template <> -struct CTypeTraits { +struct CTypeTraits : TypeTraits { using ArrowType = Decimal256Type; };