(
(let $1 (Uint64 '2))
(let $2 (DataType 'Int32))
(let $3 (StructType '('"key" $2) '('"subkey1" $2) '('"value" (DataType 'String))))
(let $4 '('('"_logical_id" '768) '('"_id" '"a3c2b5a7-f599e2eb-3f2b8cc6-c4efe311") '('"_wide_channels" $3)))
(let $5 (DqPhyStage '() (lambda '() (block '(
  (let $11 '@@["StructType";[["key";["DataType";"Int32"]];["subkey";["DataType";"Int32"]];["value";["DataType";"String"]]]]@@)
  (let $12 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $11)))
  (let $13 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $14 (YtStat '('Id '"Input") '('RecordsCount '"11") '('DataSize '"374") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $15 (YtTable '"Input" $12 $13 $14 '() (Void) (Void) '"/Root/plato"))
  (let $16 '('"key" '"subkey" '"value"))
  (let $17 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $15 $16 (Void) (Void))) '()))))
  (let $18 (Bool 'true))
  (let $19 '($18 $18 $18))
  (let $20 (TopSort (NarrowMap (DqReadWideWrap $17 '()) (lambda '($22 $23 $24) (AsStruct '('"key" $22) '('"subkey1" (+ $23 (Int32 '0))) '('"value" $24)))) $1 $19 (lambda '($25) '((Member $25 '"key") (Member $25 '"subkey1") (Member $25 '"value")))))
  (let $21 (lambda '($26) (Member $26 '"key") (Member $26 '"subkey1") (Member $26 '"value")))
  (return (FromFlow (ExpandMap $20 $21)))
))) $4))
(let $6 '('('0 '"Asc") '('1 '"Asc") '('2 '"Asc")))
(let $7 (DqCnMerge (TDqOutput $5 '0) $6))
(let $8 (DqPhyStage '($7) (lambda '($27) (FromFlow (NarrowMap (Take (ToFlow $27) $1) (lambda '($28 $29 $30) (AsStruct '('"key" $28) '('"subkey1" $29) '('"value" $30)))))) '('('"_logical_id" '781) '('"_id" '"d4d4db4c-fc78d80c-49513001-f8b055f6"))))
(let $9 '('"key" '"subkey1" '"value"))
(let $10 (DqCnResult (TDqOutput $8 '0) $9))
(return (KqpPhysicalQuery '((KqpPhysicalTx '($5 $8) '($10) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $3) '0 '0)) '('('"type" '"query"))))
)
