Skip to content

Commit 4b5d232

Browse files
Fixed a subtle bug in removing aliases (#8003)
1 parent dff29e8 commit 4b5d232

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
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
@@ -67,11 +67,11 @@ class TJoinHypergraph {
6767
auto leftKey = left.AttributeName;
6868
auto rightKey = right.AttributeName;
6969

70-
if (auto idx = leftKey.find_last_of('.') != TString::npos) {
70+
if (auto idx = leftKey.find_last_of('.'); idx != TString::npos) {
7171
leftKey = leftKey.substr(idx+1);
7272
}
7373

74-
if (auto idx = rightKey.find_last_of('.') != TString::npos) {
74+
if (auto idx = rightKey.find_last_of('.'); idx != TString::npos) {
7575
rightKey = rightKey.substr(idx+1);
7676
}
7777

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace {
2424

2525

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

ydb/library/yql/providers/dq/planner/execution_planner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ using namespace Yql::DqsProto;
4242

4343
namespace {
4444
TString RemoveAliases(TString attributeName) {
45-
if (auto idx = attributeName.find_last_of('.') != TString::npos) {
45+
if (auto idx = attributeName.find_last_of('.'); idx != TString::npos) {
4646
return attributeName.substr(idx+1);
4747
}
4848
return attributeName;

0 commit comments

Comments
 (0)