Skip to content

Commit

Permalink
Merge branch 'main' of github.com:duckdb/duckdb into http_logging
Browse files Browse the repository at this point in the history
  • Loading branch information
lnkuiper committed Apr 15, 2024
2 parents 8856d5d + 4476a91 commit c254b6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class CardinalityEstimator {
void PrintRelationToTdomInfo();

private:
bool SingleColumnFilter(FilterInfo &filter_info);
bool SingleRelationFilter(FilterInfo &filter_info);
vector<idx_t> DetermineMatchingEquivalentSets(FilterInfo *filter_info);
//! Given a filter, add the column bindings to the matching equivalent set at the index
//! given in matching equivalent sets.
Expand Down
8 changes: 4 additions & 4 deletions src/optimizer/join_order/cardinality_estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ void CardinalityEstimator::AddRelationTdom(FilterInfo &filter_info) {
relations_to_tdoms.emplace_back(new_r2tdom);
}

bool CardinalityEstimator::SingleColumnFilter(FilterInfo &filter_info) {
if (filter_info.left_set && filter_info.right_set) {
// Both set
bool CardinalityEstimator::SingleRelationFilter(FilterInfo &filter_info) {
if (filter_info.left_set && filter_info.right_set && filter_info.set.count > 1) {
// Both set and are from different relations
return false;
}
if (EmptyFilter(filter_info)) {
Expand Down Expand Up @@ -100,7 +100,7 @@ void CardinalityEstimator::InitEquivalentRelations(const vector<unique_ptr<Filte
// For each filter, we fill keep track of the index of the equivalent relation set
// the left and right relation needs to be added to.
for (auto &filter : filter_infos) {
if (SingleColumnFilter(*filter)) {
if (SingleRelationFilter(*filter)) {
// Filter on one relation, (i.e string or range filter on a column).
// Grab the first relation and add it to the equivalence_relations
AddRelationTdom(*filter);
Expand Down

0 comments on commit c254b6d

Please sign in to comment.