(
(let $1 (Configure! world (DataSource '"config") '"DqEngine" '"force"))
(let $2 (Configure! $1 (DataSource '"dq" '"$all") '"Attr" '"maxtasksperstage" '"10"))
(let $3 (Configure! $2 (DataSource '"pq" '"$all") '"Attr" '"consumer" '"test_client"))
(let $4 (DataSource '"pq" '"pq"))
(let $5 (DataType 'String))
(let $6 (StructType '('"Data" $5)))
(let $7 (PqTopic '"pq" '"local" '"test_topic_input" '('('"PartitionsCount" '1)) '() $6))
(let $8 '('"SharedReading" '1))
(let $9 '('('"Consumer" '"test_client") '('"Endpoint" '"<pq_pq_endpoint>") $8 '('"ReconnectPeriod" '"") '('"Format" '"raw") '('"ReadGroup" '"fqrun") '('"UseSsl" '1)))
(let $10 (DqPqTopicSource $3 $7 '('"Data") $9 (SecureParam '"cluster:default_pq") '"" $6 '""))
(let $11 (DqStage '((DqSource $4 $10)) (lambda '($17) (block '(
  (let $18 '('('"format" '"raw") '('"formatSettings" '('('"data.datetime.formatname" '"POSIX") '('"data.timestamp.formatname" '"POSIX"))) '('"settings" '($8))))
  (let $19 (DqSourceWideWrap $17 $4 $6 $18))
  (return (FlatMap (NarrowMap $19 (lambda '($20) (AsStruct '('"Data" $20)))) (lambda '($21) (block '(
    (let $22 (Member $21 '"Data"))
    (return (Just (AsStruct '('"Data" $22) '('"crc" (Unwrap (% (Size $22) (Int32 '"8")))))))
  )))))
))) '('('"_logical_id" '0))))
(let $12 (DataType 'Uint64))
(let $13 (DataSink '"solomon" '"solomon"))
(let $14 (DataType 'Uint32))
(let $15 (StructType '('"count" $12) '('"crc8" $5) '('"max_length" $14) '('"min_length" $14) '('"sum" $12) '('"ts" (DataType 'Timestamp))))
(let $16 (SoShard '"solomon" '"project" '"cluster" '"service" $15 (SecureParam '"cluster:default_solomon")))
(return (Commit! (Commit! (DqQuery! $3 '((DqStage '((DqCnHashShuffle (TDqOutput $11 '0) '('"crc"))) (lambda '($23) (block '(
  (let $24 (Interval '5000000))
  (let $25 (lambda '($34) $34))
  (let $26 (MultiHoppingCore (FromFlow $23) (lambda '($27) (Member $27 '"crc")) (lambda '($28) (Just (CurrentUtcTimestamp (DependsOn $28)))) $24 $24 $24 'true (lambda '($29) (block '(
    (let $30 (Size (Member $29 '"Data")))
    (return (AsStruct '('Count0 (Uint64 '1)) '('Max0 $30) '('Min0 $30) '('Sum0 (SafeCast $30 $12))))
  ))) (lambda '($31 $32) (block '(
    (let $33 (Size (Member $31 '"Data")))
    (return (AsStruct '('Count0 (Inc (Member $32 'Count0))) '('Max0 (AggrMax $33 (Member $32 'Max0))) '('Min0 (AggrMin $33 (Member $32 'Min0))) '('Sum0 (AggrAdd (SafeCast $33 $12) (Member $32 'Sum0)))))
  ))) $25 $25 (lambda '($35 $36) (AsStruct '('Count0 (AggrAdd (Member $35 'Count0) (Member $36 'Count0))) '('Max0 (AggrMax (Member $35 'Max0) (Member $36 'Max0))) '('Min0 (AggrMin (Member $35 'Min0) (Member $36 'Min0))) '('Sum0 (AggrAdd (Member $35 'Sum0) (Member $36 'Sum0))))) (lambda '($37 $38 $39) (AsStruct '('Count0 (Member $38 'Count0)) '('Max0 (Member $38 'Max0)) '('Min0 (Member $38 'Min0)) '('Sum0 (Member $38 'Sum0)) '('_yql_time $39) '('"crc" $37))) '0 '_yql_time))
  (return (FlatMap $26 (lambda '($40) (Just (AsStruct '('"count" (Member $40 'Count0)) '('"crc8" (SafeCast (Member $40 '"crc") $5)) '('"max_length" (Member $40 'Max0)) '('"min_length" (Member $40 'Min0)) '('"sum" (Member $40 'Sum0)) '('"ts" (Unwrap (Member $40 '_yql_time))))))))
))) '('('"_logical_id" '0)) '((DqSink '0 $13 $16))))) (DataSink '"pq" '"pq")) $13))
)
