@@ -5672,7 +5672,7 @@ bool CollectBlockRewrites(const TMultiExprType* multiInputType, bool keepInputCo
5672
5672
std::string_view arrowFunctionName;
5673
5673
const bool rewriteAsIs = node->IsCallable({"AssumeStrict", "AssumeNonStrict", "Likely"});
5674
5674
if (node->IsList() || rewriteAsIs ||
5675
- node->IsCallable({"And", "Or", "Xor", "Not", "Coalesce", "Exists", "If", "Just", "AsStruct", " Member", "Nth", "ToPg", "FromPg", "PgResolvedCall", "PgResolvedOp"}))
5675
+ node->IsCallable({"And", "Or", "Xor", "Not", "Coalesce", "Exists", "If", "Just", "Member", "Nth", "ToPg", "FromPg", "PgResolvedCall", "PgResolvedOp"}))
5676
5676
{
5677
5677
if (node->IsCallable() && !IsSupportedAsBlockType(node->Pos(), *node->GetTypeAnn(), ctx, types)) {
5678
5678
return true;
@@ -5711,29 +5711,6 @@ bool CollectBlockRewrites(const TMultiExprType* multiInputType, bool keepInputCo
5711
5711
}
5712
5712
}
5713
5713
5714
- // <AsStruct> arguments (i.e. members of the resulting structure)
5715
- // are literal tuples, that don't propagate their child rewrites.
5716
- // Hence, process these rewrites the following way: wrap the
5717
- // complete expressions, supported by the block engine, with
5718
- // <AsScalar> callable or apply the rewrite of one is found.
5719
- // Otherwise, abort this <AsStruct> rewrite, since one of its
5720
- // arguments is neither block nor scalar.
5721
- if (node->IsCallable("AsStruct")) {
5722
- for (ui32 index = 0; index < node->ChildrenSize(); index++) {
5723
- auto member = funcArgs[index];
5724
- auto child = member->TailPtr();
5725
- TExprNodePtr rewrite;
5726
- if (child->IsComplete() && IsSupportedAsBlockType(child->Pos(), *child->GetTypeAnn(), ctx, types)) {
5727
- rewrite = ctx.NewCallable(child->Pos(), "AsScalar", { child });
5728
- } else if (auto rit = rewrites.find(child.Get()); rit != rewrites.end()) {
5729
- rewrite = rit->second;
5730
- } else {
5731
- return true;
5732
- }
5733
- funcArgs[index] = ctx.NewList(member->Pos(), {member->HeadPtr(), rewrite});
5734
- }
5735
- }
5736
-
5737
5714
const TString blockFuncName = rewriteAsIs ? ToString(node->Content()) :
5738
5715
(TString("Block") + (node->IsList() ? "AsTuple" : node->Content()));
5739
5716
if (node->IsCallable({"And", "Or", "Xor"}) && funcArgs.size() > 2) {
0 commit comments