(
(declare %kqp%tx_result_binding_1_0 (OptionalType (StructType '('"key" (DataType 'String)))))
(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 (YtReadTable! world $1 '((YtSection '((YtPath $6 '('"key") (Void) (Void))) '()))))
(let $8 (Uint64 '3))
(let $9 (Bool 'true))
(let $10 '('('0 $9)))
(let $11 (DataType 'String))
(let $12 '('"key" $11))
(let $13 (StructType $12))
(let $14 '('"_wide_channels" $13))
(let $15 '('('"_logical_id" '1679) '('"_id" '"d2941a20-2250def9-82d9c253-ea25f2ed") $14))
(let $16 (DqPhyStage '() (lambda '() (FromFlow (WideTop (DqReadWideWrap $7 '()) $8 $10))) $15))
(let $17 (DqCnUnionAll (TDqOutput $16 '0)))
(let $18 (lambda '($44) (AsStruct '('"key" $44))))
(let $19 (DqPhyStage '($17) (lambda '($42) (block '(
  (let $43 (WideTop (ToFlow $42) $8 $10))
  (return (FromFlow (NarrowMap $43 $18)))
))) '('('"_logical_id" '1695) '('"_id" '"dd66e908-16caea72-76c25652-9dd839d"))))
(let $20 (DqCnResult (TDqOutput $19 '0) '()))
(let $21 '('('"type" '"generic")))
(let $22 (KqpPhysicalTx '($16 $19) '($20) '() $21))
(let $23 (Uint64 '1))
(let $24 '('('"_logical_id" '1894) '('"_id" '"88df639c-a1efbfb1-5c25b60a-d2494aa4") $14))
(let $25 (DqPhyStage '() (lambda '() (FromFlow (WideTopSort (DqReadWideWrap $7 '()) $23 '('('0 $9))))) $24))
(let $26 (DqCnMerge (TDqOutput $25 '0) '('('0 '"Asc"))))
(let $27 (OptionalType $13))
(let $28 (Bool 'false))
(let $29 (DqPhyStage '($26) (lambda '($45) (FromFlow (Condense (NarrowMap (Take (ToFlow $45) $23) $18) (Nothing $27) (lambda '($46 $47) $28) (lambda '($48 $49) (Just $48))))) '('('"_logical_id" '1983) '('"_id" '"26055d57-366fa158-edce0f6e-363b4a86"))))
(let $30 (DqCnValue (TDqOutput $29 '0)))
(let $31 (KqpPhysicalTx '($25 $29) '($30) '() '('('"type" '"compute"))))
(let $32 '"%kqp%tx_result_binding_1_0")
(let $33 (DqPhyStage '() (lambda '() (block '(
  (let $50 '('"key" '"subkey" '"value"))
  (let $51 (YtReadTable! world $1 '((YtSection '((YtPath $6 $50 (Void) (Void))) '()))))
  (return (FromFlow (NarrowMap (WideFilter (DqReadWideWrap $51 '()) (lambda '($52 $53 $54) (Coalesce (== $52 (Member %kqp%tx_result_binding_1_0 '"key")) $28))) (lambda '($55 $56 $57) (AsStruct '('"key" $55) '('"subkey" $56) '('"value" $57))))))
))) '('('"_logical_id" '2157) '('"_id" '"c19b9bb4-977d10e7-bfcd6c92-15c4e488"))))
(let $34 (DqCnUnionAll (TDqOutput $33 '0)))
(let $35 (DqPhyStage '($34) (lambda '($58) $58) '('('"_logical_id" '2753) '('"_id" '"db5b5ee0-53831477-94c82c9-9a5abccb"))))
(let $36 (DqCnResult (TDqOutput $35 '0) '()))
(let $37 (KqpTxResultBinding $27 '1 '0))
(let $38 (KqpPhysicalTx '($33 $35) '($36) '('($32 $37)) $21))
(let $39 '($22 $31 $38))
(let $40 (KqpTxResultBinding (ListType $13) '0 '0))
(let $41 (KqpTxResultBinding (ListType (StructType $12 '('"subkey" $11) '('"value" $11))) '"2" '0))
(return (KqpPhysicalQuery $39 '($40 $41) '('('"type" '"query"))))
)
