Skip to content

Commit 04af800

Browse files
pavelvelikhovPavel Velikhov
and
Pavel Velikhov
authored
Changed alias handling in CBO (#15311)
Co-authored-by: Pavel Velikhov <[email protected]>
1 parent da5df7f commit 04af800

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ydb/library/yql/dq/opt/dq_opt_join_hypergraph.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ class TJoinHypergraph {
5454

5555
void RemoveAttributeAliases() {
5656
for (auto& leftKey : LeftJoinKeys) {
57-
if (auto idx = leftKey.AttributeName.find_last_of('.'); idx != TString::npos) {
57+
if (auto idx = leftKey.AttributeName.find('.'); idx != TString::npos) {
5858
leftKey.AttributeName = leftKey.AttributeName.substr(idx + 1);
5959
}
6060
}
6161

6262
for (auto& rightKey : RightJoinKeys) {
63-
if (auto idx = rightKey.AttributeName.find_last_of('.'); idx != TString::npos) {
63+
if (auto idx = rightKey.AttributeName.find('.'); idx != TString::npos) {
6464
rightKey.AttributeName = rightKey.AttributeName.substr(idx + 1);
6565
}
6666
}

ydb/library/yql/dq/opt/dq_opt_stat.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ namespace {
2424

2525

2626
TString RemoveAliases(TString attributeName) {
27-
if (auto idx = attributeName.find_last_of('.'); idx != TString::npos) {
27+
if (auto idx = attributeName.find('.'); idx != TString::npos) {
2828
return attributeName.substr(idx+1);
2929
}
3030
return attributeName;
3131
}
3232

3333
TString ExtractAlias(TString attributeName) {
34-
if (auto idx = attributeName.find_last_of('.'); idx != TString::npos) {
34+
if (auto idx = attributeName.find('.'); idx != TString::npos) {
3535
auto substr = attributeName.substr(0, idx);
36-
if (auto idx2 = substr.find_last_of('.'); idx != TString::npos) {
36+
if (auto idx2 = substr.find('.'); idx != TString::npos) {
3737
substr = substr.substr(idx2+1);
3838
}
3939
return substr;

0 commit comments

Comments
 (0)