Skip to content

Commit

Permalink
Merge e1dc002 into e6f71f0
Browse files Browse the repository at this point in the history
  • Loading branch information
ssmike authored Oct 21, 2024
2 parents e6f71f0 + e1dc002 commit 7d8242d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ydb/core/kqp/opt/physical/effects/kqp_opt_phy_returning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ TExprBase KqpRewriteReturningUpsert(TExprBase node, TExprContext& ctx, const TKq
return node;
}

if (!upsert.Input().Maybe<TDqPrecompute>() && !upsert.Input().Maybe<TDqPhyPrecompute>()) {
if (upsert.Input().Maybe<TDqPrecompute>() || upsert.Input().Maybe<TDqPhyPrecompute>()) {
return node;
}

Expand All @@ -226,7 +226,7 @@ TExprBase KqpRewriteReturningDelete(TExprBase node, TExprContext& ctx, const TKq
return node;
}

if (!del.Input().Maybe<TDqPrecompute>() && !del.Input().Maybe<TDqPhyPrecompute>()) {
if (del.Input().Maybe<TDqPrecompute>() || del.Input().Maybe<TDqPhyPrecompute>()) {
return node;
}

Expand Down
10 changes: 10 additions & 0 deletions ydb/library/yql/dq/opt/dq_opt_phy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2744,6 +2744,16 @@ TExprBase DqPropagatePrecomuteTake(TExprBase node, TExprContext& ctx, IOptimizat
return node;
}

auto* typeAnn = precompute.Connection().Raw()->GetTypeAnn();

YQL_ENSURE(typeAnn);
typeAnn = GetSeqItemType(typeAnn);

const TTypeAnnotationNode* itemType;
if (!EnsureNewSeqType<false>(precompute.Connection().Pos(), *typeAnn, ctx, &itemType)) {
return node;
}

auto takeLambda = Build<TCoLambda>(ctx, node.Pos())
.Args({"list_stream"})
.Body<TCoMap>()
Expand Down

0 comments on commit 7d8242d

Please sign in to comment.