diff --git a/sql/hash_join_iterator.cc b/sql/hash_join_iterator.cc index 7aa676b4ff1..2be51e4e427 100644 --- a/sql/hash_join_iterator.cc +++ b/sql/hash_join_iterator.cc @@ -339,8 +339,8 @@ static bool InitializeChunkFiles(size_t estimated_rows_produced_by_join, bool include_match_flag_for_probe, Mem_root_array *chunk_pairs) { constexpr double kReductionFactor = 0.9; - const size_t reduced_rows_in_hash_table = - std::max(1, rows_in_hash_table * kReductionFactor); + const double reduced_rows_in_hash_table = + std::max(1.0, rows_in_hash_table * kReductionFactor); // Avoid underflow, since the hash table may contain more rows than the // estimate from the planner.