(
(let $1 '('0 '1))
(let $2 '('"RegionID" (DataType 'Int32)))
(let $3 (DataType 'Int64))
(let $4 '('('"_logical_id" '1755) '('"_id" '"4f658c9f-72bbaa12-c87fdae1-14ae7c43") '('"_wide_channels" (StructType $2 '('"UserID" $3)))))
(let $5 (DqPhyStage '() (lambda '() (block '(
  (let $20 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $21 (KqpBlockReadOlapTableRanges $20 (Void) '('"RegionID" '"UserID") '() '() (lambda '($22) $22)))
  (return (BlockCombineHashed (FromFlow $21) (Void) $1 '()))
))) $4))
(let $6 (DqCnHashShuffle (TDqOutput $5 '0) $1 '0 '"HashV1"))
(let $7 '('0))
(let $8 (DataType 'Uint64))
(let $9 (StructType $2 '('_yql_agg_0 (OptionalType $8)) '('"_yql_group_stream_index" (DataType 'Uint32))))
(let $10 '('('"_logical_id" '2565) '('"_id" '"b53e67a8-761ca320-35fc81fb-217b6ab8") '('"_wide_channels" $9)))
(let $11 (DqPhyStage '($6) (lambda '($23) (block '(
  (let $24 (BlockMergeFinalizeHashed $23 $1 '()))
  (let $25 (lambda '($26 $27) $26 (Just $27) (Uint32 '0)))
  (return (FromFlow (WideMap (ToFlow (WideFromBlocks (BlockCombineHashed $24 (Void) $7 '('((AggBlockApply 'count $3) '1))))) $25)))
))) $10))
(let $12 (DqCnHashShuffle (TDqOutput $11 '0) $7 '0 '"HashV1"))
(let $13 (Uint64 '10))
(let $14 '('('"_logical_id" '3062) '('"_id" '"71fd7b4e-dbbc3c26-86d4ffaf-363ddfb") '('"_wide_channels" (StructType '('Count0 $8) $2))))
(let $15 (DqPhyStage '($12) (lambda '($28) (block '(
  (let $29 (lambda '($33 $34 $35) $33 $35 $34))
  (let $30 (AggBlockApplyState 'count $8 $8))
  (let $31 (WideTopSort (ToFlow (WideFromBlocks (BlockMergeManyFinalizeHashed (WideToBlocks (FromFlow (WideMap (ToFlow $28) $29))) $7 '('($30 '"2")) '1 '($7)))) $13 '('('1 (Bool 'false)))))
  (let $32 (lambda '($36 $37) $37 $36))
  (return (FromFlow (WideMap $31 $32)))
))) $14))
(let $16 (DqCnMerge (TDqOutput $15 '0) '('('0 '"Desc"))))
(let $17 (DqPhyStage '($16) (lambda '($38) (FromFlow (NarrowMap (Take (ToFlow $38) $13) (lambda '($39 $40) (AsStruct '('"RegionID" $40) '('"u" $39)))))) '('('"_logical_id" '3180) '('"_id" '"34ce0f9e-72b65a60-c754915c-679e50a"))))
(let $18 '($5 $11 $15 $17))
(let $19 (DqCnResult (TDqOutput $17 '0) '('"RegionID" '"u")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $18 '($19) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType $2 '('"u" $8))) '0 '0)) '('('"type" '"query"))))
)
