Skip to content

Commit

Permalink
Fix compile issue
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Feb 11, 2024
1 parent 7f546f2 commit 34972e4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion velox/functions/prestosql/types/JsonType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,14 +586,21 @@ simdjson::error_code appendMapKey(
const std::string_view& value,
exec::GenericWriter& writer) {
using T = typename TypeTraits<kind>::NativeType;
if constexpr (std::is_same_v<T, void>) {
if constexpr (std::is_same_v<T, void> || std::is_same_v<T, UnknownValue>) {
return simdjson::INCORRECT_TYPE;
} else {
SIMDJSON_ASSIGN_OR_RAISE(writer.castTo<T>(), fromString<T>(value));
return simdjson::SUCCESS;
}
}

template <>
simdjson::error_code appendMapKey<TypeKind::UNKNOWN>(
const std::string_view& value,
exec::GenericWriter& writer) {
VELOX_NYI("UNKNOWN type is not supported!");
}

template <>
simdjson::error_code appendMapKey<TypeKind::VARCHAR>(
const std::string_view& value,
Expand Down

0 comments on commit 34972e4

Please sign in to comment.