Skip to content

Commit

Permalink
Change IPPREFIX type to row type in typeof (facebookincubator#11449)
Browse files Browse the repository at this point in the history
Summary:
When switching from varbinary based to row based ipprefix the typeof was not changed. Changed here to fix the issue.

Split from:
facebookincubator#11309

Pull Request resolved: facebookincubator#11449

Reviewed By: yuandagits

Differential Revision: D65612144

Pulled By: kevinwilfong

fbshipit-source-id: 8fc716f0c8e78a1355727b2c1179c9955828c16c
  • Loading branch information
mohsaka authored and facebook-github-bot committed Nov 7, 2024
1 parent 1d4e89d commit 396b2bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions velox/functions/prestosql/TypeOf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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(";
Expand Down

0 comments on commit 396b2bb

Please sign in to comment.