Skip to content

Commit

Permalink
Fixed clang14 problem with lambda capture (ydb-platform#1475)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelvelikhov authored and shnikd committed Feb 6, 2024
1 parent 9d8fecd commit 9956ca1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ydb/core/kqp/opt/logical/kqp_opt_cbo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ bool IsLookupJoinApplicable(std::shared_ptr<IBaseOptimizerNode> left,
}

for (auto [leftCol, rightCol] : joinConditions) {
// Fix for clang14, somehow structured binding does not create a variable in clang14
auto r = rightCol;
if (! find_if(rightStats->KeyColumns.begin(), rightStats->KeyColumns.end(),
[rightCol] (const TString& s) {
return rightCol.AttributeName == s;
[r] (const TString& s) {
return r.AttributeName == s;
} )) {
return false;
}
Expand Down

0 comments on commit 9956ca1

Please sign in to comment.