(
(let $1 '('0))
(let $2 (DataType 'Int64))
(let $3 '('('"_logical_id" '1608) '('"_id" '"d18b9206-b4044ab1-714b4dae-369f4e32") '('"_wide_channels" (StructType '('"UserID" $2)))))
(let $4 (DqPhyStage '() (lambda '() (block '(
  (let $13 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $14 (KqpBlockReadOlapTableRanges $13 (Void) '('"UserID") '() '() (lambda '($15) $15)))
  (return (BlockCombineHashed (FromFlow $14) (Void) $1 '()))
))) $3))
(let $5 (DqCnHashShuffle (TDqOutput $4 '0) $1 '0 '"HashV1"))
(let $6 (DataType 'Uint64))
(let $7 '('('"_logical_id" '2344) '('"_id" '"97436cbf-905adaf8-21cf0d9b-3e626b55") '('"_wide_channels" (StructType '('_yql_agg_0 (OptionalType $6)) '('"_yql_group_stream_index" (DataType 'Uint32))))))
(let $8 (DqPhyStage '($5) (lambda '($16) (block '(
  (let $17 (BlockMergeFinalizeHashed $16 $1 '()))
  (let $18 (lambda '($19) (Just $19) (Uint32 '0)))
  (return (FromFlow (WideMap (ToFlow (BlockCombineAll $17 (Void) '('((AggBlockApply 'count $2) '0)))) $18)))
))) $7))
(let $9 (DqCnUnionAll (TDqOutput $8 '0)))
(let $10 (DqPhyStage '($9) (lambda '($20) (block '(
  (let $21 (Bool 'false))
  (let $22 (WideCondense1 (WideMap (ToFlow $20) (lambda '($24 $25) $24)) (lambda '($26) $26) (lambda '($27 $28) $21) (lambda '($29 $30) (IfPresent $29 (lambda '($31) (IfPresent $30 (lambda '($32) (Just (AggrAdd $31 $32))) $29)) $30))))
  (let $23 (Condense (NarrowMap (Take $22 (Uint64 '1)) (lambda '($33) (AsStruct '('Count0 (Unwrap $33))))) (Nothing (OptionalType (StructType '('Count0 $6)))) (lambda '($34 $35) $21) (lambda '($36 $37) (Just $36))))
  (return (FromFlow (Map $23 (lambda '($38) (AsStruct '('"column0" (Coalesce (Member $38 'Count0) (Uint64 '0))))))))
))) '('('"_logical_id" '3012) '('"_id" '"6c4079b0-4a0e221e-81bbdfd7-7e6fdab3"))))
(let $11 '($4 $8 $10))
(let $12 (DqCnResult (TDqOutput $10 '0) '('"column0")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $11 '($12) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType '('"column0" $6))) '0 '0)) '('('"type" '"query"))))
)
