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 very small indexes work. #511

Merged
merged 6 commits into from
Dec 2, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/engine/SortPerformanceEstimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ void SortPerformanceEstimator::computeEstimatesExpensively(
} else {
// not even the smallest IdTable could be created, this should never
// happen.
AD_CHECK(false);
LOG(WARN)
<< "Could not create any estimate for the sorting performance. "
"This might happen if your index is very small"
<< std::endl;
}
LOG(TRACE) << "Estimated the sort time to be " << std::fixed
<< std::setprecision(3) << _samples[i][j] << " seconds."
Expand Down
1 change: 1 addition & 0 deletions src/engine/SortPerformanceEstimator.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class SortPerformanceEstimator {
// The time in seconds for the samples that are sorted during initializtion.
// _samples[i][j] is the measured time it takes to sort an IdTable with
// sampleValuesRows[i] rows and sampleValuesCols[j] columns.
// The values are default-initialized to 0.
std::array<std::array<double, NUM_SAMPLES_COLS>, NUM_SAMPLES_ROWS> _samples{};

bool _estimatesWereCalculated = false;
Expand Down