(
(let $1 (DataType 'Uint64))
(let $2 (DataType 'String))
(let $3 '('"key" $2))
(let $4 '('"subkey" $2))
(let $5 (StructType '('_yql_RowNumber0 $1) '('_yql_RowNumber1 $1) $3 $4))
(let $6 '('('"_logical_id" '2485) '('"_id" '"e93f6024-f85c7caf-5e0de242-5827d8dc") '('"_wide_channels" $5)))
(let $7 (DqPhyStage '() (lambda '() (block '(
  (let $17 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $18 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $17)))
  (let $19 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" 'false)))))
  (let $20 (YtStat '('Id '"Input") '('RecordsCount '"4") '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $21 (YtTable '"Input" $18 $19 $20 '() (Void) (Void) '"/Root/plato"))
  (let $22 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $21 '('"key" '"subkey") (Void) (Void))) '('('"syscolumns" '('"num")))))))
  (let $23 (lambda '($24 $25 $26) $24 $24 $25 $26))
  (return (FromFlow (WideMap (DqReadWideWrap $22 '()) $23)))
))) $6))
(let $8 (DqCnUnionAll (TDqOutput $7 '0)))
(let $9 (StructType $3 '('"rn1" $1) '('"rn2" $1) '('"rn3" $1) $4))
(let $10 '('('"_logical_id" '2764) '('"_id" '"b898d361-abe09572-1b39a4a5-49cd3adc") '('"_wide_channels" $9)))
(let $11 (DqPhyStage '($8) (lambda '($27) (block '(
  (let $28 (Chain1Map (NarrowMap (WideSort (ToFlow $27) '('('3 (Bool 'false)))) (lambda '($31 $32 $33 $34) (AsStruct '('_yql_RowNumber0 $31) '('_yql_RowNumber1 $32) '('"key" $33) '('"subkey" $34)))) (lambda '($35) (block '(
    (let $36 '('_yql_RowNumber2 (Uint64 '1)))
    (let $37 (AsStruct '('_yql_RowNumber0 (Member $35 '_yql_RowNumber0)) '('_yql_RowNumber1 (Member $35 '_yql_RowNumber1)) $36 '('"key" (Member $35 '"key")) '('"subkey" (Member $35 '"subkey"))))
    (return '($37 (AsStruct $36)))
  ))) (lambda '($38 $39) (block '(
    (let $40 '('_yql_RowNumber2 (Inc (Member (Nth $39 '1) '_yql_RowNumber2))))
    (let $41 (AsStruct '('_yql_RowNumber0 (Member $38 '_yql_RowNumber0)) '('_yql_RowNumber1 (Member $38 '_yql_RowNumber1)) $40 '('"key" (Member $38 '"key")) '('"subkey" (Member $38 '"subkey"))))
    (return '($41 (AsStruct $40)))
  )))))
  (let $29 (Sort (Map $28 (lambda '($42) (block '(
    (let $43 (Nth $42 '0))
    (return (AsStruct '('"key" (Member $43 '"key")) '('"rn1" (Member $43 '_yql_RowNumber0)) '('"rn2" (Member $43 '_yql_RowNumber1)) '('"rn3" (Member $43 '_yql_RowNumber2)) '('"subkey" (Member $43 '"subkey"))))
  )))) (Bool 'true) (lambda '($44) (Member $44 '"subkey"))))
  (let $30 (lambda '($45) (Member $45 '"key") (Member $45 '"rn1") (Member $45 '"rn2") (Member $45 '"rn3") (Member $45 '"subkey")))
  (return (FromFlow (ExpandMap $29 $30)))
))) $10))
(let $12 (DqCnMerge (TDqOutput $11 '0) '('('"4" '"Asc"))))
(let $13 (DqPhyStage '($12) (lambda '($46) (FromFlow (NarrowMap (ToFlow $46) (lambda '($47 $48 $49 $50 $51) (AsStruct '('"key" $47) '('"rn1" $48) '('"rn2" $49) '('"rn3" $50) '('"subkey" $51)))))) '('('"_logical_id" '2776) '('"_id" '"5b56ea01-b9ba9ef9-7021cf92-588d48e"))))
(let $14 '($7 $11 $13))
(let $15 '('"key" '"subkey" '"rn1" '"rn2" '"rn3"))
(let $16 (DqCnResult (TDqOutput $13 '0) $15))
(return (KqpPhysicalQuery '((KqpPhysicalTx $14 '($16) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $9) '0 '0)) '('('"type" '"query"))))
)
