(
(let $1 (lambda '($35 $36 $37) $36 $37 $35))
(let $2 (DataType 'String))
(let $3 (ListType $2))
(let $4 (DataType 'Int32))
(let $5 (StructType '('_yql_agg_0 $3) '('_yql_agg_1 $3) '('mod (OptionalType $4))))
(let $6 '('('"_logical_id" '3006) '('"_id" '"4fef1d21-3b8ae6da-ab71d76f-8d671180") '('"_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 '"14") '('DataSize '"614") '('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))) '()))))
  (let $23 (lambda '($27 $28 $29) (AsList $28) (AsList $29)))
  (let $24 (lambda '($30 $31 $32 $33 $34) (Insert $33 $31) (Insert $34 $32)))
  (return (WideFromBlocks (DqPhyHashCombine (WideToBlocks (FromFlow (DqReadWideWrap $22 '()))) '-1073741824 (lambda '($25 $26) (% (SafeCast $25 (OptionalType (DataType 'Uint32))) (Int32 '"10"))) $23 $24 $1)))
))) $6))
(let $8 (DqCnHashShuffle (TDqOutput $7 '0) '('"2") '0 '"HashV2"))
(let $9 (DataType 'Uint64))
(let $10 (StructType '('di (TupleType $9 $2)) '('dk (DictType $9 $2)) '('ls $2) '('mod $4)))
(let $11 '('('"_logical_id" '3680) '('"_id" '"bd7171f3-e90fc8a4-f08ecf58-82244f4a") '('"_wide_channels" $10)))
(let $12 (DqPhyStage '($8) (lambda '($38) (block '(
  (let $39 (lambda '($48 $49 $50 $51) $49 $50))
  (let $40 (lambda '($52 $53 $54 $55 $56 $57) (Extend $53 $56) (Extend $54 $57)))
  (let $41 (WideCombiner (ToFlow $38) '"" (lambda '($45 $46 $47) $47) $39 $40 $1))
  (let $42 (Bool 'true))
  (let $43 (Sort (NarrowFlatMap $41 (lambda '($58 $59 $60) (OrderedFlatMap $60 (lambda '($61) (block '(
    (let $62 (Uint64 '1))
    (let $63 (lambda '($65) $65))
    (let $64 (ToIndexDict (TopSort $58 $62 $42 $63)))
    (return (OrderedFlatMap (Collect (DictItems $64)) (lambda '($66) (OrderedMap (Collect (TopSort $59 $62 $42 $63)) (lambda '($67) (AsStruct '('di $66) '('dk $64) '('ls $67) '('mod $61)))))))
  )))))) $42 (lambda '($68) (Member $68 'mod))))
  (let $44 (lambda '($69) (Member $69 'di) (Member $69 'dk) (Member $69 'ls) (Member $69 'mod)))
  (return (FromFlow (ExpandMap $43 $44)))
))) $11))
(let $13 (DqCnMerge (TDqOutput $12 '0) '('('"3" '"Asc"))))
(let $14 (DqPhyStage '($13) (lambda '($70) (FromFlow (NarrowMap (ToFlow $70) (lambda '($71 $72 $73 $74) (AsStruct '('di $71) '('dk $72) '('ls $73) '('mod $74)))))) '('('"_logical_id" '3692) '('"_id" '"dd758f3e-d64a9dd4-d3d37516-6e51dc8f"))))
(let $15 '($7 $12 $14))
(let $16 (DqCnResult (TDqOutput $14 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx $15 '($16) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $10) '0 '0)) '('('"type" '"query"))))
)
