Skip to content

Commit

Permalink
Remove unused function from velox/functions/lib/StringEncodingUtils.h (
Browse files Browse the repository at this point in the history
…#8544)

Summary:
Pull Request resolved: #8544

`-Wunused-function` has identified an unused function. This diff removes it. In many cases these functions have existed for years in an unused state.

Reviewed By: palmje

Differential Revision: D53049729

fbshipit-source-id: 00c9bd9da342dbbef236cff87f329829eeea23d8
  • Loading branch information
r-barnes authored and facebook-github-bot committed Jan 29, 2024
1 parent e47f523 commit 4b3b9bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
10 changes: 10 additions & 0 deletions velox/functions/lib/StringEncodingUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,14 @@ bool prepareFlatResultsVector(
return false;
}

/// Return the string encoding of a vector, if not set UTF8 is returned
bool isAscii(BaseVector* vector, const SelectivityVector& rows) {
if (auto simpleVector = vector->template as<SimpleVector<StringView>>()) {
auto ascii = simpleVector->isAscii(rows);
return ascii.has_value() && ascii.value();
}
VELOX_UNREACHABLE();
return false;
};

} // namespace facebook::velox::functions
9 changes: 1 addition & 8 deletions velox/functions/lib/StringEncodingUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,7 @@ bool prepareFlatResultsVector(
const TypePtr& resultType = VARCHAR());

/// Return the string encoding of a vector, if not set UTF8 is returned
static bool isAscii(BaseVector* vector, const SelectivityVector& rows) {
if (auto simpleVector = vector->template as<SimpleVector<StringView>>()) {
auto ascii = simpleVector->isAscii(rows);
return ascii.has_value() && ascii.value();
}
VELOX_UNREACHABLE();
return false;
};
bool isAscii(BaseVector* vector, const SelectivityVector& rows);

/// Wrap an input function with the appropriate ascii instantiation.
/// Func is a struct templated on boolean with a static function
Expand Down

0 comments on commit 4b3b9bc

Please sign in to comment.