Skip to content

Commit

Permalink
fix: use proper string concatenation for error on unsupported types (#…
Browse files Browse the repository at this point in the history
…125)

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 <ingomueller@google.com>
  • Loading branch information
ingomueller-net authored Sep 24, 2024
1 parent 33ee19c commit 3f633f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/substrait/type/Type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ ParameterizedTypePtr decodeType(
bool nullable,
const std::vector<ParameterizedTypePtr>& parameterTypes) {
SUBSTRAIT_UNSUPPORTED(
"Unsupported parameter type: " + TypeTraits<Kind>::kTypeString);
std::string("Unsupported parameter type: ") +
TypeTraits<Kind>::kTypeString);
}

template <>
Expand Down

0 comments on commit 3f633f2

Please sign in to comment.