Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Small fix to compile on Mac (note that we do not support Mac builds). (
Browse files Browse the repository at this point in the history
  • Loading branch information
abigalekim authored May 15, 2021
1 parent ea2312b commit 30bd635
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/optimizer/statistics/selectivity_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ double SelectivityUtil::Equal(common::ManagedPointer<ColumnStats<T>> column_stat
auto value_frequency_estimate = top_k->EstimateItemCount(value);

// If all values are distinct, then there can be at most one value equal to the specified value
if (column_stats->GetDistinctValues() == numrows) value_frequency_estimate = std::min(value_frequency_estimate, 1lu);
if (column_stats->GetDistinctValues() == numrows)
value_frequency_estimate = std::min<uint64_t>(value_frequency_estimate, 1lu);

double res = value_frequency_estimate / static_cast<double>(numrows);

Expand Down

0 comments on commit 30bd635

Please sign in to comment.