(
(let $1 (Bool 'true))
(let $2 (DataType 'String))
(let $3 (DataType 'Uint64))
(let $4 '('"key" $2))
(let $5 '('"value" $3))
(let $6 (StructType '('_yql_agg_0 $3) $4 $5))
(let $7 '('('"_logical_id" '1408) '('"_id" '"ece10246-19e6af95-b5bd56b5-e7211311") '('"_wide_channels" $6)))
(let $8 (DqPhyStage '() (lambda '() (block '(
  (let $19 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"Uint64"]]]]@@)
  (let $20 '('"key" '"subkey"))
  (let $21 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $19) '('SortDirections '($1 $1)) '('SortMembers $20) '('SortedBy $20) '('SortedByTypes '($2 $2))))
  (let $22 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $23 (YtStat '('Id '"Input") '('RecordsCount '"10") '('DataSize '"391") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $24 (YtTable '"Input" $21 $22 $23 '() (Void) (Void) '"/Root/plato"))
  (let $25 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $24 '('"key" '"value") (Void) (Void))) '('('"unordered"))))))
  (let $26 (lambda '($29 $30) $29 $30))
  (let $27 (Uint64 '1))
  (let $28 (lambda '($40 $41 $42) $42 $40 $41))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (DqReadWideWrap $25 '()))) '-1073741824 $26 (lambda '($31 $32 $33 $34) $27) (lambda '($35 $36 $37 $38 $39) (AggrAdd $39 $27)) $28))
))) $7))
(let $9 (DqCnHashShuffle (TDqOutput $8 '0) '('1 '"2") '0 '"HashV2"))
(let $10 (StructType '('"c" $3) $4 $5))
(let $11 '('('"_logical_id" '1683) '('"_id" '"a6305b2a-832031db-f744edfa-2ecc1f5e") '('"_wide_channels" $10)))
(let $12 (DqPhyStage '($9) (lambda '($43) (block '(
  (let $44 (NarrowSqueezeToDict (ToFlow (WideFromBlocks $43)) (lambda '($49 $50 $51) '($50 $51)) (lambda '($52 $53 $54) (AsStruct '('_yql_agg_0 $52) '('"key" $53) '('"value" $54))) '('Auto 'Many)))
  (let $45 (Condense1 (OrderedFlatMap $44 (lambda '($55) (OrderedFlatMap (DictPayloads $55) (lambda '($56) $56)))) (lambda '($57) $57) (lambda '($58 $59) (Or (AggrNotEquals (Member $58 '"key") (Member $59 '"key")) (AggrNotEquals (Member $58 '"value") (Member $59 '"value")))) (lambda '($60 $61) (AsStruct '('_yql_agg_0 (AggrAdd (Member $60 '_yql_agg_0) (Member $61 '_yql_agg_0))) '('"key" (Member $61 '"key")) '('"value" (Member $61 '"value"))))))
  (let $46 '($1 $1 $1))
  (let $47 (Sort (Map $45 (lambda '($62) (AsStruct '('"c" (Member $62 '_yql_agg_0)) '('"key" (Member $62 '"key")) '('"value" (Member $62 '"value"))))) $46 (lambda '($63) '((Member $63 '"c") (Member $63 '"key") (Member $63 '"value")))))
  (let $48 (lambda '($64) (Member $64 '"c") (Member $64 '"key") (Member $64 '"value")))
  (return (FromFlow (ExpandMap $47 $48)))
))) $11))
(let $13 '('('0 '"Asc") '('1 '"Asc") '('"2" '"Asc")))
(let $14 (DqCnMerge (TDqOutput $12 '0) $13))
(let $15 (DqPhyStage '($14) (lambda '($65) (FromFlow (NarrowMap (ToFlow $65) (lambda '($66 $67 $68) (AsStruct '('"c" $66) '('"key" $67) '('"value" $68)))))) '('('"_logical_id" '1695) '('"_id" '"e71ace77-87a81cd7-37a650ee-283e0491"))))
(let $16 '($8 $12 $15))
(let $17 '('"key" '"value" '"c"))
(let $18 (DqCnResult (TDqOutput $15 '0) $17))
(return (KqpPhysicalQuery '((KqpPhysicalTx $16 '($18) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $10) '0 '0)) '('('"type" '"query"))))
)
