(
(declare %kqp%tx_result_binding_2_0 (DataType 'Bool))
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
(let $3 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $2)))
(let $4 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
(let $5 (YtStat '('Id '"Input") '('RecordsCount '"4") '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
(let $6 (YtTable '"Input" $3 $4 $5 '() (Void) (Void) '"/Root/plato"))
(let $7 '('"key"))
(let $8 (YtReadTable! world $1 '((YtSection '((YtPath $6 $7 (Void) (Void))) '()))))
(let $9 (DqReadWideWrap $8 '()))
(let $10 (Uint64 '100))
(let $11 (Bool 'true))
(let $12 '('('0 $11)))
(let $13 (DataType 'String))
(let $14 '('"key" $13))
(let $15 (StructType $14))
(let $16 '('"_wide_channels" $15))
(let $17 '('('"_logical_id" '4291) '('"_id" '"22167953-23534168-9c87abc1-6b6d23c5") $16))
(let $18 (DqPhyStage '() (lambda '() (FromFlow (WideTop $9 $10 $12))) $17))
(let $19 (DqCnUnionAll (TDqOutput $18 '0)))
(let $20 '('('"_logical_id" '4363) '('"_id" '"77c6bf68-a7651cd6-7befd6f9-98db172") $16))
(let $21 (DqPhyStage '($19) (lambda '($97) (block '(
  (let $98 (WideTop (ToFlow $97) $10 $12))
  (return (FromFlow (WideTopSort $98 $10 $12)))
))) $20))
(let $22 '('('0 '"Asc")))
(let $23 (DqCnMerge (TDqOutput $21 '0) $22))
(let $24 '('('"_logical_id" '4376) '('"_id" '"66fb85c8-761a84c4-34046d46-c5392018") $16))
(let $25 (DqPhyStage '($23) (lambda '($99) (FromFlow (Take (ToFlow $99) $10))) $24))
(let $26 (DqCnBroadcast (TDqOutput $25 '0)))
(let $27 '('One 'Hashed 'Compact))
(let $28 '('"key" '"subkey" '"value"))
(let $29 (YtReadTable! world $1 '((YtSection '((YtPath $6 $28 (Void) (Void))) '()))))
(let $30 (DqReadWideWrap $29 '()))
(let $31 '('"_yql_injoin_input.key"))
(let $32 '('"_yql_injoin_0.key"))
(let $33 (StructType $14 '('"subkey" $13) '('"value" $13)))
(let $34 '('"_wide_channels" $33))
(let $35 '('('"_logical_id" '4527) '('"_id" '"900d47de-8f7719aa-396a9e0-580ac397") $34))
(let $36 (DqPhyStage '($26) (lambda '($100) (block '(
  (let $101 (NarrowSqueezeToDict (ToFlow $100) (lambda '($102) $102) (lambda '($103) (Void)) $27))
  (return (FromFlow (WideSort (FlatMap $101 (lambda '($104) (block '(
    (let $105 '('0 '0 '1 '1 '2 '2))
    (return (MapJoinCore $30 $104 'LeftSemi '('0) $7 $105 '() $31 $32))
  )))) $12)))
))) $35))
(let $37 (DqCnMerge (TDqOutput $36 '0) $22))
(let $38 (lambda '($107 $108 $109) (AsStruct '('"key" $107) '('"subkey" $108) '('"value" $109))))
(let $39 (DqPhyStage '($37) (lambda '($106) (FromFlow (NarrowMap (ToFlow $106) $38))) '('('"_logical_id" '4539) '('"_id" '"d116e0d5-e0b43939-3a82843-f78355a1"))))
(let $40 '($18 $21 $25 $36 $39))
(let $41 (DqCnResult (TDqOutput $39 '0) '()))
(let $42 '('('"type" '"generic")))
(let $43 (KqpPhysicalTx $40 '($41) '() $42))
(let $44 '('('0 $11)))
(let $45 '('('"_logical_id" '4745) '('"_id" '"8fd61c9d-1c209e9b-5242dd94-ae1619f1") $16))
(let $46 (DqPhyStage '() (lambda '() (FromFlow (WideTop $9 $10 $44))) $45))
(let $47 (DqCnUnionAll (TDqOutput $46 '0)))
(let $48 '('('"_logical_id" '4817) '('"_id" '"fc98096c-2fdaff2d-8144431c-cfab1702") $16))
(let $49 (DqPhyStage '($47) (lambda '($110) (block '(
  (let $111 (WideTop (ToFlow $110) $10 $44))
  (return (FromFlow (WideTopSort $111 $10 $44)))
))) $48))
(let $50 (DqCnMerge (TDqOutput $49 '0) $22))
(let $51 '('('"_logical_id" '4830) '('"_id" '"c8607365-6f82231b-dd3bf5ec-2e41c3ff") $16))
(let $52 (DqPhyStage '($50) (lambda '($112) (FromFlow (Take (ToFlow $112) $10))) $51))
(let $53 (DqCnBroadcast (TDqOutput $52 '0)))
(let $54 '('('"_logical_id" '4981) '('"_id" '"27478db0-9f0fcc6b-36c07319-b7fcf5b0") $34))
(let $55 (DqPhyStage '($53) (lambda '($113) (block '(
  (let $114 (NarrowSqueezeToDict (ToFlow $113) (lambda '($115) $115) (lambda '($116) (Void)) $27))
  (return (FromFlow (WideSort (FlatMap $114 (lambda '($117) (block '(
    (let $118 '('0 '0 '1 '1 '2 '2))
    (return (MapJoinCore $30 $117 'LeftSemi '('0) $7 $118 '() $31 $32))
  )))) $44)))
))) $54))
(let $56 (DqCnMerge (TDqOutput $55 '0) $22))
(let $57 (DqPhyStage '($56) (lambda '($119) (FromFlow (NarrowMap (ToFlow $119) $38))) '('('"_logical_id" '4993) '('"_id" '"1030ad27-b407dfb1-5cdfde4-c360dd2f"))))
(let $58 '($46 $49 $52 $55 $57))
(let $59 (DqCnResult (TDqOutput $57 '0) '()))
(let $60 (KqpPhysicalTx $58 '($59) '() $42))
(let $61 '('('0 $11)))
(let $62 '('('"_logical_id" '5116) '('"_id" '"1e07f330-64817fb-f69f12fd-8a9a24f") $16))
(let $63 (DqPhyStage '() (lambda '() (FromFlow (WideTop $9 $10 $61))) $62))
(let $64 (DqCnUnionAll (TDqOutput $63 '0)))
(let $65 (Uint64 '1))
(let $66 '('('"_logical_id" '5185) '('"_id" '"9b8181db-42cd4b94-64c5b8a9-feed99be") $16))
(let $67 (DqPhyStage '($64) (lambda '($120) (FromFlow (WideTop (ToFlow $120) $65 $61))) $66))
(let $68 (DqCnUnionAll (TDqOutput $67 '0)))
(let $69 (lambda '($122) (AsStruct '('"key" $122))))
(let $70 (Bool '"false"))
(let $71 (DqPhyStage '($68) (lambda '($121) (FromFlow (Condense (NarrowMap (ToFlow $121) $69) $70 (lambda '($123 $124) $70) (lambda '($125 $126) $11)))) '('('"_logical_id" '8507) '('"_id" '"9e35cca2-1e9ea3f2-3cf0b54d-442b1f3"))))
(let $72 '($63 $67 $71))
(let $73 (DqCnValue (TDqOutput $71 '0)))
(let $74 (KqpPhysicalTx $72 '($73) '() '('('"type" '"compute"))))
(let $75 '"%kqp%tx_result_binding_2_0")
(let $76 (DataType 'Bool))
(let $77 (DqPhyStage '() (lambda '() (block '(
  (let $127 (YtReadTable! world $1 '((YtSection '((YtPath $6 '() (Void) (Void))) '()))))
  (return (FromFlow (NarrowMap (DqReadWideWrap $127 '()) (lambda '() (AsStruct '('"column0" %kqp%tx_result_binding_2_0))))))
))) '('('"_logical_id" '5338) '('"_id" '"ddd46974-ba5f60a7-24411b8b-ea5f04b8"))))
(let $78 (DqCnUnionAll (TDqOutput $77 '0)))
(let $79 (DqPhyStage '($78) (lambda '($128) $128) '('('"_logical_id" '8997) '('"_id" '"aafb144d-7c10261d-82a0f882-2f28b25d"))))
(let $80 '('"column0"))
(let $81 (DqCnResult (TDqOutput $79 '0) $80))
(let $82 (KqpTxResultBinding $76 '"2" '0))
(let $83 (KqpPhysicalTx '($77 $79) '($81) '('($75 $82)) $42))
(let $84 '('('"_logical_id" '5459) '('"_id" '"e1842967-dec41181-47c81c37-ee78f305") $16))
(let $85 (DqPhyStage '() (lambda '() (FromFlow (WideTopSort (DqReadWideWrap $8 '()) $65 '('('0 $11))))) $84))
(let $86 (DqCnMerge (TDqOutput $85 '0) $22))
(let $87 (DqPhyStage '($86) (lambda '($129) (block '(
  (let $130 (Condense (NarrowMap (Take (ToFlow $129) $65) $69) (Nothing (OptionalType $15)) (lambda '($131 $132) $70) (lambda '($133 $134) (Just $133))))
  (return (FromFlow (Map $130 (lambda '($135) (AsStruct '('"column0" (Member $135 '"key")))))))
))) '('('"_logical_id" '5738) '('"_id" '"20de0c88-f15d256e-d8bcfc8f-63e27011"))))
(let $88 (DqCnResult (TDqOutput $87 '0) $80))
(let $89 (KqpPhysicalTx '($85 $87) '($88) '() $42))
(let $90 '($43 $60 $74 $83 $89))
(let $91 (ListType $33))
(let $92 (KqpTxResultBinding $91 '0 '0))
(let $93 (KqpTxResultBinding $91 '1 '0))
(let $94 (KqpTxResultBinding (ListType (StructType '('"column0" $76))) '"3" '0))
(let $95 (KqpTxResultBinding (ListType (StructType '('"column0" (OptionalType $13)))) '"4" '0))
(let $96 '($92 $93 $94 $95))
(return (KqpPhysicalQuery $90 $96 '('('"type" '"query"))))
)
