Skip to content

Commit

Permalink
streamlookup: fix for left table name is prefix of right table (#9177)
Browse files Browse the repository at this point in the history
  • Loading branch information
yumkam authored Sep 13, 2024
1 parent b0a5850 commit 1e0b2d6
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,17 @@ TOutputRowColumnOrder CategorizeOutputRowItems(
size_t idxRightPayload = 0;
for (ui32 i = 0; i != type->GetMembersCount(); ++i) {
const auto prefixedName = type->GetMemberName(i);
if (prefixedName.starts_with(leftLabel)) {
Y_ABORT_IF(prefixedName.length() == leftLabel.length());
if (prefixedName.starts_with(leftLabel) &&
prefixedName.length() > leftLabel.length() &&
prefixedName[leftLabel.length()] == '.') {
const auto name = prefixedName.SubStr(leftLabel.length() + 1); //skip prefix and dot
result[i] = {
leftJoinColumns.contains(name) ? EOutputRowItemSource::InputKey : EOutputRowItemSource::InputOther,
idxLeft++
};
} else if (prefixedName.starts_with(rightLabel)) {
Y_ABORT_IF(prefixedName.length() == rightLabel.length());
} else if (prefixedName.starts_with(rightLabel) &&
prefixedName.length() > rightLabel.length() &&
prefixedName[rightLabel.length()] == '.') {
const auto name = prefixedName.SubStr(rightLabel.length() + 1); //skip prefix and dot
//presume that indexes in LookupKey, LookupOther has the same relative position as in OutputRow
if (rightJoinColumns.contains(name)) {
Expand Down

0 comments on commit 1e0b2d6

Please sign in to comment.