From 9f82a9069745f5a166fbab57ca832b7d40ec3ccb Mon Sep 17 00:00:00 2001 From: mohsaka <135669458+mohsaka@users.noreply.github.com> Date: Tue, 5 Nov 2024 16:07:19 -0800 Subject: [PATCH] Change IPPREFIX type to row type in typeof --- velox/functions/prestosql/TypeOf.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/velox/functions/prestosql/TypeOf.cpp b/velox/functions/prestosql/TypeOf.cpp index 85cf19128f7..f2a16af5ac2 100644 --- a/velox/functions/prestosql/TypeOf.cpp +++ b/velox/functions/prestosql/TypeOf.cpp @@ -79,8 +79,6 @@ std::string typeName(const TypePtr& type) { case TypeKind::VARBINARY: if (isHyperLogLogType(type)) { return "HyperLogLog"; - } else if (isIPPrefixType(type)) { - return "ipprefix"; } return "varbinary"; case TypeKind::TIMESTAMP: @@ -93,6 +91,9 @@ std::string typeName(const TypePtr& type) { typeName(type->childAt(0)), typeName(type->childAt(1))); case TypeKind::ROW: { + if (isIPPrefixType(type)) { + return "ipprefix"; + } const auto& rowType = type->asRow(); std::ostringstream out; out << "row(";