From 396b2bbb6fd2a7340d45ff9f7e9b0c588606de61 Mon Sep 17 00:00:00 2001 From: mohsaka <135669458+mohsaka@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:13:32 -0800 Subject: [PATCH] Change IPPREFIX type to row type in typeof (#11449) Summary: When switching from varbinary based to row based ipprefix the typeof was not changed. Changed here to fix the issue. Split from: https://github.com/facebookincubator/velox/pull/11309 Pull Request resolved: https://github.com/facebookincubator/velox/pull/11449 Reviewed By: yuandagits Differential Revision: D65612144 Pulled By: kevinwilfong fbshipit-source-id: 8fc716f0c8e78a1355727b2c1179c9955828c16c --- 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 85cf19128f75..f2a16af5ac2f 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(";