(
(let $1 (OptionalType (DataType 'Int32)))
(let $2 '('mod_k $1))
(let $3 '('mod_sk $1))
(let $4 (DataType 'Uint64))
(let $5 (StructType '('_yql_agg_0 $4) $2 $3))
(let $6 '('('"_logical_id" '1657) '('"_id" '"713cb895-94152c7c-b6b80795-700b6bf") '('"_wide_channels" $5)))
(let $7 (DqPhyStage '() (lambda '() (block '(
  (let $14 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $15 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $14)))
  (let $16 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('HasRLS '0) '('Attrs '('('"native_strict_schema" 'false)))))
  (let $17 (YtStat '('Id '"Input") '('RecordsCount '"10") '('DataSize '"424") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $18 (YtTable '"Input" $15 $16 $17 '() (Void) (Void) '"/Root/plato"))
  (let $19 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $18 '('"key" '"subkey") (Void) (Void) (Void))) '()))))
  (let $20 (lambda '($29) (Member $29 'mod_k) (Member $29 'mod_sk)))
  (let $21 (lambda '($30 $31) $30 $31))
  (let $22 (Uint64 '1))
  (let $23 (lambda '($41 $42 $43) $43 $41 $42))
  (return (FromFlow (DqPhyHashCombine (ExpandMap (NarrowFlatMap (DqReadWideWrap $19 '()) (lambda '($24 $25) (block '(
    (let $26 (OptionalType (DataType 'Uint32)))
    (let $27 (Int32 '"10"))
    (let $28 (% (SafeCast $24 $26) $27))
    (return (If (Coalesce (== $28 (Int32 '"7")) (Bool 'false)) (Just (AsStruct '('mod_k $28) '('mod_sk (% (SafeCast $25 $26) $27)))) (Nothing (OptionalType (StructType $2 $3)))))
  )))) $20) '-1073741824 $21 (lambda '($32 $33 $34 $35) $22) (lambda '($36 $37 $38 $39 $40) (AggrAdd $40 $22)) $23)))
))) $6))
(let $8 (DqCnHashShuffle (TDqOutput $7 '0) '('1 '"2") '0 '"HashV2"))
(let $9 (DqPhyStage '($8) (lambda '($44) (block '(
  (let $45 (lambda '($48 $49 $50) $49 $50))
  (let $46 (lambda '($62 $63 $64) $64 $63))
  (let $47 (DqPhyHashCombine (ToFlow $44) '"" $45 (lambda '($51 $52 $53 $54 $55) $53) (lambda '($56 $57 $58 $59 $60 $61) (AggrAdd $58 $61)) $46))
  (return (FromFlow (NarrowMap $47 (lambda '($65 $66) (AsStruct '('"count" $65) '('mod_sk $66))))))
))) '('('"_logical_id" '2250) '('"_id" '"ad9308ed-1a8a2d5c-100366e4-3d9a1829"))))
(let $10 (DqCnUnionAll (TDqOutput $9 '0)))
(let $11 (DqPhyStage '($10) (lambda '($67) $67) '('('"_logical_id" '2484) '('"_id" '"98ce1dcc-2ffc7648-5884e765-d5d64a5a"))))
(let $12 '($7 $9 $11))
(let $13 (DqCnResult (TDqOutput $11 '0) '('"count" 'mod_sk)))
(return (KqpPhysicalQuery '((KqpPhysicalTx $12 '($13) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType '('"count" $4) $3)) '0 '0)) '('('"type" '"query"))))
)
