Skip to content

Commit

Permalink
Remove dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsaka committed Dec 9, 2024
1 parent 2ec9cc0 commit 2f2b418
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 3 additions & 2 deletions velox/expression/FunctionSignature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@

#include "velox/common/base/Exceptions.h"
#include "velox/expression/FunctionSignature.h"
#include "velox/functions/prestosql/types/IPPrefixType.h"
#include "velox/type/Type.h"

constexpr folly::StringPiece ipPrefixTypeName{"IPPREFIX"};

namespace facebook::velox::exec {

std::string sanitizeName(const std::string& name) {
Expand Down Expand Up @@ -122,7 +123,7 @@ void validateBaseTypeAndCollectTypeParams(
if (!isPositiveInteger(typeName) &&
!tryMapNameToTypeKind(typeName).has_value() &&
!isDecimalName(typeName) && !isDateName(typeName) &&
!isIPPrefixName(typeName)) {
!(typeName == ipPrefixTypeName)) {
VELOX_USER_CHECK(hasType(typeName), "Type doesn't exist: '{}'", typeName);
}

Expand Down
4 changes: 0 additions & 4 deletions velox/functions/prestosql/types/IPPrefixType.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ FOLLY_ALWAYS_INLINE bool isIPPrefixType(const TypePtr& type) {
return IPPrefixType::get() == type;
}

FOLLY_ALWAYS_INLINE bool isIPPrefixName(const std::string& name) {
return (name == IPPrefixType::get()->name());
}

FOLLY_ALWAYS_INLINE std::shared_ptr<const IPPrefixType> IPPREFIX() {
return IPPrefixType::get();
}
Expand Down

0 comments on commit 2f2b418

Please sign in to comment.