(
(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" '"8385af61-82b0de81-7b6c00be-ee4e84a7") '('"_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" '"54e9833c-a2e8566a-6c2e282d-51c7248a") '('"_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" '"b35e014d-1c1ecc3a-b105bedc-be8e1762"))))
(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"))))
)
