Skip to content

Commit

Permalink
Remove unreachable code in ArrayIntersectExcept (#10712)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #10712

Reviewed By: kagamiori

Differential Revision: D61109228

Pulled By: kewang1024

fbshipit-source-id: b417c537aa04aba4b4383e9d2e6bf7db8c9fcdb5
  • Loading branch information
kewang1024 authored and facebook-github-bot committed Aug 13, 2024
1 parent 82e5492 commit 83ff1dd
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions velox/functions/prestosql/ArrayIntersectExcept.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ struct SetWithNull {
// Generates a set based on the elements of an ArrayVector. Note that we take
// rightSet as a parameter (instead of returning a new one) to reuse the
// allocated memory.
template <typename T, typename TVector>
template <typename T>
void generateSet(
const ArrayVector* arrayVector,
const TVector* arrayElements,
const DecodedVector* arrayElements,
vector_size_t idx,
SetWithNull<T>& rightSet) {
auto size = arrayVector->sizeAt(idx);
Expand All @@ -57,13 +57,7 @@ void generateSet(
if (arrayElements->isNullAt(i)) {
rightSet.hasNull = true;
} else {
// Function can be called with either FlatVector or DecodedVector, but
// their APIs are slightly different.
if constexpr (std::is_same_v<TVector, DecodedVector>) {
rightSet.set.insert(arrayElements->template valueAt<T>(i));
} else {
rightSet.set.insert(arrayElements->valueAt(i));
}
rightSet.set.insert(arrayElements->template valueAt<T>(i));
}
}
}
Expand Down

0 comments on commit 83ff1dd

Please sign in to comment.