(
(let $1 (DataType 'Uint64))
(let $2 (OptionalType $1))
(let $3 '('('"_logical_id" '1388) '('"_id" '"4167a693-56fc751d-1b4e1683-5103fa1a") '('"_wide_channels" (StructType '('_yql_agg_0 $2) '('group0 (OptionalType (DataType 'Int32)))))))
(let $4 (DqPhyStage '() (lambda '() (block '(
  (let $13 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $14 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $13)))
  (let $15 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" 'false)))))
  (let $16 (YtStat '('Id '"Input") '('RecordsCount '"10") '('DataSize '"424") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $17 (YtTable '"Input" $14 $15 $16 '() (Void) (Void) '"/Root/plato"))
  (let $18 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $17 '('"key" '"subkey") (Void) (Void))) '()))))
  (let $19 (OptionalType (DataType 'Uint32)))
  (let $20 (lambda '($28) (Just (SafeCast $28 $1))))
  (let $21 (Nothing $2))
  (let $22 (lambda '($34 $35) $35 $34))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (DqReadWideWrap $18 '()))) '-1073741824 (lambda '($23 $24) (+ (/ (SafeCast $23 $19) (Int32 '"100")) (% (SafeCast $24 $19) (Int32 '"10")))) (lambda '($25 $26 $27) (IfPresent (SafeCast $26 $19) $20 $21)) (lambda '($29 $30 $31 $32) (block '(
    (let $33 (IfPresent (SafeCast $30 $19) $20 $21))
    (return (AggrAdd $33 $32))
  ))) $22))
))) $3))
(let $5 (DqCnHashShuffle (TDqOutput $4 '0) '('1) '0 '"HashV2"))
(let $6 (StructType '('"keysum" $2)))
(let $7 '('('"_logical_id" '2617) '('"_id" '"1cfc2fca-35daf05f-d08fcf6b-77a00096") '('"_wide_channels" $6)))
(let $8 (DqPhyStage '($5) (lambda '($36) (block '(
  (let $37 (WideCombiner (ToFlow (WideFromBlocks $36)) '"" (lambda '($38 $39) $39) (lambda '($40 $41 $42) $41) (lambda '($43 $44 $45 $46) (AggrAdd $44 $46)) (lambda '($47 $48) $48)))
  (return (FromFlow (WideSort $37 '('('0 (Bool 'false))))))
))) $7))
(let $9 (DqCnMerge (TDqOutput $8 '0) '('('0 '"Desc"))))
(let $10 (DqPhyStage '($9) (lambda '($49) (FromFlow (NarrowMap (ToFlow $49) (lambda '($50) (AsStruct '('"keysum" $50)))))) '('('"_logical_id" '2629) '('"_id" '"116e0edb-e7a3053c-650b52aa-b3cf257"))))
(let $11 '($4 $8 $10))
(let $12 (DqCnResult (TDqOutput $10 '0) '('"keysum")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $11 '($12) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $6) '0 '0)) '('('"type" '"query"))))
)
