Skip to content

Commit 28b32eb

Browse files
authored
Fixed validation of lambda before apply (#8153)
1 parent 331c965 commit 28b32eb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ydb/library/yql/core/type_ann/type_ann_core.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9098,6 +9098,11 @@ template <NKikimr::NUdf::EDataSlot DataSlot>
90989098
if (extractKeyLambda->IsAtom()) {
90999099
TExprNode::TPtr applied;
91009100
if (udf->IsLambda()) {
9101+
if (udf->Head().ChildrenSize() != 1) {
9102+
ctx.Expr.AddError(TIssue(ctx.Expr.GetPosition(pos), TStringBuilder() << "Expected lambda with one argument, but got: " << udf->Head().ChildrenSize()));
9103+
return IGraphTransformer::TStatus::Error;
9104+
}
9105+
91019106
applied = ctx.Expr.Builder(pos)
91029107
.Apply(udf)
91039108
.With(0, udfInput)

0 commit comments

Comments
 (0)