(
(let $1 (Bool 'true))
(let $2 '($1 $1))
(let $3 (DataType 'String))
(let $4 '('"key" '"value"))
(let $5 (StructType '('"key" $3) '('"value" $3)))
(let $6 '('('"_logical_id" '759) '('"_id" '"77337395-259d3746-6c71de45-83554c39") '('"_wide_channels" $5)))
(let $7 (DqPhyStage '() (lambda '() (block '(
  (let $11 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $12 '('"key" '"subkey"))
  (let $13 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $11) '('SortDirections $2) '('SortMembers $12) '('SortedBy $12) '('SortedByTypes '($3 $3))))
  (let $14 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $15 (YtStat '('Id '"Input") '('RecordsCount '"3") '('DataSize '"121") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $16 (YtTable '"Input" $13 $14 $15 '() (Void) (Void) '"/Root/plato"))
  (let $17 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $16 $4 (Void) (Void))) '('('"unordered"))))))
  (return (FromFlow (DqReadWideWrap $17 '())))
))) $6))
(let $8 (DqCnUnionAll (TDqOutput $7 '0)))
(let $9 (DqPhyStage '($8) (lambda '($18) (block '(
  (let $19 (Sort (NarrowMap (ToFlow $18) (lambda '($20 $21) (block '(
    (let $22 (OptionalType (DataType 'Bool)))
    (let $23 (CallableType '('"3") '((ListType $3)) '((OptionalType $3)) '($3) '($22 '"DelimeterString") '($22 '"SkipEmpty") '((OptionalType (DataType 'Uint64)) '"Limit")))
    (let $24 (Udf '"String.SplitToList" (Void) (VoidType) '"" $23 (VoidType) '"" '('('"strict"))))
    (return (AsStruct '('_yql_sys_order_by_1 (Head (NamedApply $24 '((Just $21) (String '"$")) (AsStruct '('"Limit" (Just (Uint64 '2))))))) '('"key" $20) '('"value" $21)))
  )))) $2 (lambda '($25) '((Member $25 '"key") (Member $25 '_yql_sys_order_by_1)))))
  (return (FromFlow (OrderedMap $19 (lambda '($26) (AsStruct '('"key" (Member $26 '"key")) '('"value" (Member $26 '"value")))))))
))) '('('"_logical_id" '798) '('"_id" '"2b226daf-524574b1-73a91e19-b31a90f4"))))
(let $10 (DqCnResult (TDqOutput $9 '0) $4))
(return (KqpPhysicalQuery '((KqpPhysicalTx '($7 $9) '($10) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $5) '0 '0)) '('('"type" '"query"))))
)
