Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make compare return int32_t instead of int64_t #11544

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions velox/expression/ComplexViewTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct ViewWithComparison {
}

private:
int64_t compareOrThrow(
int32_t compareOrThrow(
const T& other,
CompareFlags flags = CompareFlags{
.nullHandlingMode =
Expand Down Expand Up @@ -1015,7 +1015,7 @@ class RowView
return result;
}

std::optional<int64_t> compare(const RowView& other, const CompareFlags flags)
std::optional<int32_t> compare(const RowView& other, const CompareFlags flags)
const {
return compareImpl(other, flags);
}
Expand All @@ -1026,7 +1026,7 @@ class RowView
}

template <std::size_t Is = 0>
std::optional<int64_t> compareImpl(
std::optional<int32_t> compareImpl(
const RowView& other,
const CompareFlags flags) const {
if constexpr (Is < sizeof...(T)) {
Expand Down Expand Up @@ -1173,7 +1173,7 @@ class GenericView : public ViewWithComparison<GenericView> {
return decoded_.index(index_);
}

std::optional<int64_t> compare(
std::optional<int32_t> compare(
const GenericView& other,
const CompareFlags flags) const {
return decoded_.base()->compare(
Expand Down
Loading