Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

streamlookup: fix for left table name is prefix of right table #9177

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading