(
(let $1 (DataType 'Uint32))
(let $2 '('('"_logical_id" '686) '('"_id" '"d939c3b1-71de2a91-d484cee3-d88a40ad") '('"_partition_mode" '"single")))
(let $3 (DqPhyStage '() (lambda '() (block '(
  (let $5 (lambda '($7) (Member $7 'key)))
  (let $6 (Chopper (Iterator (OrderedFlatMap (DictPayloads (ToDict (AsList (AsStruct '('key (AsList (String '"foo"))) '('"value" (String '"123")))) $5 (lambda '($8) $8) '('Auto 'Many))) (lambda '($9) $9))) $5 (lambda '($10 $11) (block '(
    (let $12 (Member $11 'key))
    (return (Or (AggrNotEquals (Length $10) (Length $12)) (Exists (Head (SkipWhile (Zip $10 $12) (lambda '($13) (AggrEquals (Nth $13 '0) (Nth $13 '1))))))))
  ))) (lambda '($14 $15) (block '(
    (let $16 (Uint32 '0))
    (return (ToStream (Just (AsStruct '('key $14) '('summ (Collect (Condense $15 $16 (lambda '($17 $18) (Bool '"false")) (lambda '($19 $20) (Add $20 (Coalesce (SafeCast (Member $19 '"value") (OptionalType $1)) $16))))))))))
  )))))
  (return (Sort $6 (Bool 'true) (lambda '($21) (Member $21 'key))))
))) $2))
(let $4 (DqCnResult (TDqOutput $3 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx '($3) '($4) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType '('key (ListType (DataType 'String))) '('summ (ListType $1)))) '0 '0)) '('('"type" '"query"))))
)
