(
(let $1 (OptionalType (DataType 'TzDate)))
(let $2 (DataType 'Uint64))
(let $3 (OptionalType $2))
(let $4 '('('"_logical_id" '1364) '('"_id" '"357ee835-956cbf3e-ebf86e26-aecbada1") '('"_wide_channels" (StructType '('_yql_agg_0 $3) '('group0 $1)))))
(let $5 (DqPhyStage '() (lambda '() (block '(
  (let $12 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["OptionalType";["DataType";"String"]]]]]@@)
  (let $13 (Bool 'true))
  (let $14 '('"key" '"subkey"))
  (let $15 (DataType 'String))
  (let $16 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $12) '('SortDirections '($13 $13)) '('SortMembers $14) '('SortedBy $14) '('SortedByTypes '($15 $15))))
  (let $17 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $18 (YtStat '('Id '"Input5") '('RecordsCount '"7") '('DataSize '"291") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $19 (YtTable '"Input5" $16 $17 $18 '() (Void) (Void) '"/Root/plato"))
  (let $20 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $19 $14 (Void) (Void))) '('('"unordered"))))))
  (let $21 (OptionalType (DataType 'Uint8)))
  (let $22 (lambda '($30) (Just (SafeCast $30 $2))))
  (let $23 (Nothing $3))
  (let $24 (lambda '($36 $37) $37 $36))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (DqReadWideWrap $20 '()))) '-1073741824 (lambda '($25 $26) (SafeCast (SafeCast $25 (OptionalType (DataType 'Uint16))) $1)) (lambda '($27 $28 $29) (IfPresent (SafeCast $29 $21) $22 $23)) (lambda '($31 $32 $33 $34) (block '(
    (let $35 (IfPresent (SafeCast $33 $21) $22 $23))
    (return (AggrAdd $35 $34))
  ))) $24))
))) $4))
(let $6 (DqCnHashShuffle (TDqOutput $5 '0) '('1) '0 '"HashV2"))
(let $7 (DqPhyStage '($6) (lambda '($38) (block '(
  (let $39 (WideCombiner (ToFlow (WideFromBlocks $38)) '"" (lambda '($40 $41) $41) (lambda '($42 $43 $44) $43) (lambda '($45 $46 $47 $48) (AggrAdd $46 $48)) (lambda '($49 $50) $50)))
  (return (FromFlow (NarrowMap $39 (lambda '($51) (AsStruct '('sum $51))))))
))) '('('"_logical_id" '2499) '('"_id" '"a1354d28-8068cbdf-7a4c80d1-3ca0660e"))))
(let $8 (DqCnUnionAll (TDqOutput $7 '0)))
(let $9 (DqPhyStage '($8) (lambda '($52) $52) '('('"_logical_id" '2712) '('"_id" '"fef4a94f-ddb6f65d-3d1f35a6-8e5b0fb5"))))
(let $10 '($5 $7 $9))
(let $11 (DqCnResult (TDqOutput $9 '0) '('sum)))
(return (KqpPhysicalQuery '((KqpPhysicalTx $10 '($11) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType '('sum $3))) '0 '0)) '('('"type" '"query"))))
)
