(
(let $1 (DataType 'Uint64))
(let $2 (DataType 'String))
(let $3 '('"key" $2))
(let $4 '('"subkey" $2))
(let $5 (StructType '('_yql_agg_0 $1) $3 $4))
(let $6 '('('"_logical_id" '1726) '('"_id" '"4d72bc4f-7975f2c9-7cf0396c-f04297cd") '('"_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 '('"key" '"subkey" '"value"))
  (let $23 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $21 $22 (Void) (Void))) '()))))
  (let $24 (lambda '($26 $27 $28) $26 $27))
  (let $25 (lambda '($40 $41 $42) $42 $40 $41))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (DqReadWideWrap $23 '()))) '-1073741824 $24 (lambda '($29 $30 $31 $32 $33) (SafeCast (Size $33) $1)) (lambda '($34 $35 $36 $37 $38 $39) (AggrAdd (SafeCast (Size $38) $1) $39)) $25))
))) $6))
(let $8 (DqCnHashShuffle (TDqOutput $7 '0) '('1 '"2") '0 '"HashV2"))
(let $9 (StructType '('"column0" $1) $3 $4))
(let $10 '('('"_logical_id" '2006) '('"_id" '"244cd987-641452d8-14ea85e4-4f38ca36") '('"_wide_channels" $9)))
(let $11 (DqPhyStage '($8) (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) '('"subkey" $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 '"subkey") (Member $59 '"subkey")))) (lambda '($60 $61) (AsStruct '('_yql_agg_0 (AggrAdd (Member $60 '_yql_agg_0) (Member $61 '_yql_agg_0))) '('"key" (Member $61 '"key")) '('"subkey" (Member $61 '"subkey"))))))
  (let $46 (Bool 'true))
  (let $47 (Sort (Map $45 (lambda '($62) (AsStruct '('"column0" (Member $62 '_yql_agg_0)) '('"key" (Member $62 '"key")) '('"subkey" (Member $62 '"subkey"))))) '($46 $46) (lambda '($63) '((Member $63 '"key") (Member $63 '"subkey")))))
  (let $48 (lambda '($64) (Member $64 '"column0") (Member $64 '"key") (Member $64 '"subkey")))
  (return (FromFlow (ExpandMap $47 $48)))
))) $10))
(let $12 (DqCnMerge (TDqOutput $11 '0) '('('1 '"Asc") '('"2" '"Asc"))))
(let $13 (DqPhyStage '($12) (lambda '($65) (FromFlow (NarrowMap (ToFlow $65) (lambda '($66 $67 $68) (AsStruct '('"column0" $66) '('"key" $67) '('"subkey" $68)))))) '('('"_logical_id" '2018) '('"_id" '"5debe3f9-45fc20ba-f0ae779d-35ef5d22"))))
(let $14 '($7 $11 $13))
(let $15 '('"column0" '"key" '"subkey"))
(let $16 (DqCnResult (TDqOutput $13 '0) $15))
(return (KqpPhysicalQuery '((KqpPhysicalTx $14 '($16) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $9) '0 '0)) '('('"type" '"query"))))
)
