From 610452d138bc85e75defae93046654c99d2b01e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20M=C3=BCller?= Date: Mon, 23 Sep 2024 15:35:52 +0000 Subject: [PATCH 1/2] fix: use proper string concatenation for error on unsupported types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous default template instances of `decodeType` for parametrized types used a "concatenation" on two char pointers, which doesn't work. This PR fixes that by making one of the two an `std::string`. The error did not show up until now because all supported types have specializations of the template. Signed-off-by: Ingo Müller --- src/substrait/type/Type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/substrait/type/Type.cpp b/src/substrait/type/Type.cpp index 5a0e3cff..7a385a9b 100644 --- a/src/substrait/type/Type.cpp +++ b/src/substrait/type/Type.cpp @@ -40,7 +40,7 @@ ParameterizedTypePtr decodeType( bool nullable, const std::vector& parameterTypes) { SUBSTRAIT_UNSUPPORTED( - "Unsupported parameter type: " + TypeTraits::kTypeString); + std::string("Unsupported parameter type: ") + TypeTraits::kTypeString); } template <> From ab022c13a164b346f924f54315aae071c22ba73e Mon Sep 17 00:00:00 2001 From: David Sisson Date: Tue, 24 Sep 2024 00:09:29 -0700 Subject: [PATCH 2/2] fix style --- src/substrait/type/Type.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/substrait/type/Type.cpp b/src/substrait/type/Type.cpp index 7a385a9b..9581607a 100644 --- a/src/substrait/type/Type.cpp +++ b/src/substrait/type/Type.cpp @@ -40,7 +40,8 @@ ParameterizedTypePtr decodeType( bool nullable, const std::vector& parameterTypes) { SUBSTRAIT_UNSUPPORTED( - std::string("Unsupported parameter type: ") + TypeTraits::kTypeString); + std::string("Unsupported parameter type: ") + + TypeTraits::kTypeString); } template <>