Skip to content

Commit

Permalink
streamlookup: verify RightInput is TDqLookupSourceWrap
Browse files Browse the repository at this point in the history
(should be replaced in logical optimize)
  • Loading branch information
yumkam committed Jan 14, 2025
1 parent 42c7d42 commit c04a3e1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ydb/library/yql/dq/type_ann/dq_type_ann.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,13 @@ TStatus AnnotateDqCnStreamLookup(const TExprNode::TPtr& input, TExprContext& ctx
ctx.AddError(TIssue(ctx.GetPosition(joinType.Pos()), "Streamlookup supports only LEFT JOIN ... ANY"));
return TStatus::Error;
}
auto rightInput = cnStreamLookup.RightInput();
if (!rightInput.Raw()->IsCallable("TDqLookupSourceWrap")) {
ctx.AddError(TIssue(ctx.GetPosition(rightInput.Pos()), "Unknown DqCnStreamLookup RightInput type (must be TDqLookupSourceWrap)"));
return TStatus::Error;
}
const auto leftRowType = GetSeqItemType(leftInputType);
const auto rightRowType = GetSeqItemType(cnStreamLookup.RightInput().Raw()->GetTypeAnn());
const auto rightRowType = GetSeqItemType(rightInput.Raw()->GetTypeAnn());
const auto outputRowType = GetDqJoinResultType<true>(
input->Pos(),
*leftRowType->Cast<TStructExprType>(),
Expand Down

0 comments on commit c04a3e1

Please sign in to comment.