Skip to content

Commit

Permalink
Merge d91d0e9 into 7f4d37b
Browse files Browse the repository at this point in the history
  • Loading branch information
ssmike authored Oct 21, 2024
2 parents 7f4d37b + d91d0e9 commit e0670af
Show file tree
Hide file tree
Showing 2 changed files with 10 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
8 changes: 8 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,14 @@ TExprBase DqPropagatePrecomuteTake(TExprBase node, TExprContext& ctx, IOptimizat
return node;
}

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

YQL_ENSURE(typeAnn);
typeAnn = GetSeqItemType(typeAnn);
if (typeAnn->GetKind() == ETypeAnnotationKind::Struct) {
return node;
}

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

0 comments on commit e0670af

Please sign in to comment.