Skip to content

Commit

Permalink
remove try_equal specializations
Browse files Browse the repository at this point in the history
  • Loading branch information
romainfrancois committed Oct 7, 2024
1 parent 73f82b8 commit 7f80af1
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/relop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,36 +257,6 @@ bool try_equal(LHS_TYPE lhs, RHS_TYPE rhs) {
return relop<LHS_TYPE, RHS_TYPE, EQ>(lhs, rhs);
}

template <>
bool try_equal<string_t, timestamp_t> (string_t lhs, timestamp_t rhs) {
timestamp_t result;
if (Timestamp::TryConvertTimestamp(lhs.GetString().c_str(), lhs.GetString().length(), result) != TimestampCastResult::SUCCESS ){
return false;
}
return result == rhs;
}

template <>
bool try_equal<timestamp_t, string_t> (timestamp_t lhs, string_t rhs) {
return try_equal(rhs, lhs);
}

template <>
bool try_equal<string_t, date_t> (string_t lhs, date_t rhs) {
date_t result;
idx_t pos;
bool special = false;
if (!Date::TryConvertDate(lhs.GetString().c_str(), lhs.GetString().length(), pos, result, special, false)) {
return false;
}
return result == rhs;
}

template <>
bool try_equal<date_t, string_t> (date_t lhs, string_t rhs) {
return try_equal(rhs, lhs);
}

template <typename LHS_TYPE, typename RHS_TYPE>
void InExecute(DataChunk &args, ExpressionState &state, Vector &result) {

Expand Down

0 comments on commit 7f80af1

Please sign in to comment.