(
(let $1 '('"SearchEngineID" (DataType 'Int16)))
(let $2 '('"SearchPhrase" (DataType 'Utf8)))
(let $3 (DataType 'Uint64))
(let $4 (StructType $1 $2 '('_yql_agg_0 $3)))
(let $5 '('('"_logical_id" '1832) '('"_id" '"3d549230-f9b74929-506313ac-11f53a5d") '('"_wide_channels" $4)))
(let $6 (DqPhyStage '() (lambda '() (block '(
  (let $18 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $19 '('"SearchEngineID" '"SearchPhrase"))
  (let $20 (KqpBlockReadOlapTableRanges $18 (Void) $19 '() '() (lambda '($21) (block '(
    (let $22 '('neq '"SearchPhrase" (String '"")))
    (return (TKqpOlapAgg (KqpOlapFilter $21 $22) '('('_yql_agg_0 '"count" '"*")) $19))
  )))))
  (return (FromFlow $20))
))) $5))
(let $7 '('0 '1))
(let $8 (DqCnHashShuffle (TDqOutput $6 '0) $7 '0 '"HashV1"))
(let $9 (Uint64 '10))
(let $10 (StructType '('Count0 $3) $1 $2))
(let $11 '('('"_logical_id" '2309) '('"_id" '"49d4ad94-6f578293-faa9a8c9-80a80e49") '('"_wide_channels" $10)))
(let $12 (DqPhyStage '($8) (lambda '($23) (block '(
  (let $24 (AggBlockApplyState '"count_all" $3 $3))
  (let $25 (WideTopSort (ToFlow (WideFromBlocks (BlockMergeFinalizeHashed $23 $7 '('($24 '2))))) $9 '('('2 (Bool 'false)))))
  (let $26 (lambda '($27 $28 $29) $29 $27 $28))
  (return (FromFlow (WideMap $25 $26)))
))) $11))
(let $13 (DqCnMerge (TDqOutput $12 '0) '('('0 '"Desc"))))
(let $14 (DqPhyStage '($13) (lambda '($30) (FromFlow (NarrowMap (Take (ToFlow $30) $9) (lambda '($31 $32 $33) (AsStruct '('"SearchEngineID" $32) '('"SearchPhrase" $33) '('"c" $31)))))) '('('"_logical_id" '2428) '('"_id" '"b32b15df-9e643ecd-e1eeea5a-1848a86f"))))
(let $15 '($6 $12 $14))
(let $16 '('"SearchEngineID" '"SearchPhrase" '"c"))
(let $17 (DqCnResult (TDqOutput $14 '0) $16))
(return (KqpPhysicalQuery '((KqpPhysicalTx $15 '($17) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType $1 $2 '('"c" $3))) '0 '0)) '('('"type" '"query"))))
)
