Skip to content

Commit 9685c68

Browse files
committed
fix streamlookup keys join on unmatch
SELECT s.id, db.id FROM yds.`in` AS s LEFT JOIN /*+ streamlookup() */ ydb.`db` as db ON s.id = db.id; returned db.id equal to s.id on unmatched rows
1 parent 5b422de commit 9685c68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ydb/library/yql/dq/actors/input_transforms/dq_input_transform_lookup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class TInputTransformStreamLookupBase
111111
outputRowItems[i] = wideInputRow[index];
112112
break;
113113
case EOutputRowItemSource::LookupKey:
114-
outputRowItems[i] = lookupKey.GetElement(index);
114+
outputRowItems[i] = lookupPayload && *lookupPayload ? lookupKey.GetElement(index) : NUdf::TUnboxedValue {};
115115
break;
116116
case EOutputRowItemSource::LookupOther:
117117
if (lookupPayload && *lookupPayload) {

0 commit comments

Comments
 (0)