Skip to content

Commit

Permalink
Merge 220e60c into d5094c6
Browse files Browse the repository at this point in the history
  • Loading branch information
yumkam authored Aug 1, 2024
2 parents d5094c6 + 220e60c commit 2f29de7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
2 changes: 0 additions & 2 deletions ydb/library/yql/minikql/comp_nodes/mkql_grace_join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@ class TGraceJoinSpillingSupportState : public TComputationValue<TGraceJoinSpilli
, PartialJoinCompleted(std::make_unique<bool>(false))
, HaveMoreLeftRows(std::make_unique<bool>(true))
, HaveMoreRightRows(std::make_unique<bool>(true))
, JoinedTuple(std::make_unique<std::vector<NUdf::TUnboxedValue*>>() )
, IsSelfJoin_(isSelfJoin)
, SelfJoinSameKeys_(isSelfJoin && (leftKeyColumns == rightKeyColumns))
, IsSpillingAllowed(isSpillingAllowed)
Expand Down Expand Up @@ -989,7 +988,6 @@ EFetchResult ProcessSpilledData(TComputationContext&, NUdf::TUnboxedValue*const*
const std::unique_ptr<bool> PartialJoinCompleted;
const std::unique_ptr<bool> HaveMoreLeftRows;
const std::unique_ptr<bool> HaveMoreRightRows;
const std::unique_ptr<std::vector<NUdf::TUnboxedValue*>> JoinedTuple;
const bool IsSelfJoin_;
const bool SelfJoinSameKeys_;
const bool IsSpillingAllowed;
Expand Down
21 changes: 11 additions & 10 deletions ydb/library/yql/minikql/comp_nodes/mkql_grace_join_imp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,6 @@ TTable::EAddTupleResult TTable::AddTuple( ui64 * intColumns, char ** stringColu

ui64 bucket = hash & BucketsMask;

if (other.TableBucketsStats[bucket].BloomFilter.IsFinalized()) {
auto bucket2 = &other.TableBucketsStats[bucket];
auto &bloomFilter = bucket2->BloomFilter;
++BloomLookups_;
if (bloomFilter.IsMissing(hash)) {
++BloomHits_;
return EAddTupleResult::Unmatched;
}
}

std::vector<ui64, TMKQLAllocator<ui64>> & keyIntVals = TableBuckets[bucket].KeyIntVals;
std::vector<ui32, TMKQLAllocator<ui32>> & stringsOffsets = TableBuckets[bucket].StringsOffsets;
std::vector<ui64, TMKQLAllocator<ui64>> & dataIntVals = TableBuckets[bucket].DataIntVals;
Expand All @@ -116,6 +106,17 @@ TTable::EAddTupleResult TTable::AddTuple( ui64 * intColumns, char ** stringColu
}
}

if (other.TableBucketsStats[bucket].BloomFilter.IsFinalized()) {
auto bucket2 = &other.TableBucketsStats[bucket];
auto &bloomFilter = bucket2->BloomFilter;
++BloomLookups_;
if (bloomFilter.IsMissing(hash)) {
keyIntVals.resize(offset);
++BloomHits_;
return EAddTupleResult::Unmatched;
}
}

TableBucketsStats[bucket].TuplesNum++;

if (NumberOfStringColumns || NumberOfIColumns ) {
Expand Down

0 comments on commit 2f29de7

Please sign in to comment.