(
(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" '1831) '('"_id" '"544faae7-a0d5224-424e7fbd-48502a0") '('"_wide_channels" $4)))
(let $6 (DqPhyStage '() (lambda '() (block '(
  (let $17 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $18 '('"SearchEngineID" '"SearchPhrase"))
  (let $19 (KqpBlockReadOlapTableRanges $17 (Void) $18 '() '() (lambda '($21) (block '(
    (let $22 '('neq '"SearchPhrase" (String '"")))
    (return (TKqpOlapAgg (KqpOlapFilter $21 $22) '('('_yql_agg_0 '"count" '"*")) $18))
  )))))
  (let $20 (lambda '($23 $24 $25 $26) (block '(
    (let $27 (BlockAsStruct '('"SearchEngineID" $23) '('"SearchPhrase" $24) '('_yql_agg_0 $25)))
    (return (BlockMember $27 '"SearchEngineID") (BlockMember $27 '"SearchPhrase") (BlockMember $27 '_yql_agg_0) $26)
  ))))
  (return (FromFlow (WideMap $19 $20)))
))) $5))
(let $7 (DqCnHashShuffle (TDqOutput $6 '0) '('0 '1)))
(let $8 (Uint64 '10))
(let $9 (StructType '('Count0 $3) $1 $2))
(let $10 '('('"_logical_id" '2230) '('"_id" '"c451c9c6-6d0f0e33-b9f856f3-270d062c") '('"_wide_channels" $9)))
(let $11 (DqPhyStage '($7) (lambda '($28) (block '(
  (let $29 (lambda '($32 $33 $34) $32 $33))
  (let $30 (lambda '($46 $47 $48) $48 $46 $47))
  (let $31 (WideCombiner (ToFlow (WideFromBlocks $28)) '"" $29 (lambda '($35 $36 $37 $38 $39) $39) (lambda '($40 $41 $42 $43 $44 $45) (AggrAdd $44 $45)) $30))
  (return (FromFlow (WideTopSort $31 $8 '('('0 (Bool 'false))))))
))) $10))
(let $12 (DqCnMerge (TDqOutput $11 '0) '('('0 '"Desc"))))
(let $13 (DqPhyStage '($12) (lambda '($49) (FromFlow (NarrowMap (Take (ToFlow $49) $8) (lambda '($50 $51 $52) (AsStruct '('"SearchEngineID" $51) '('"SearchPhrase" $52) '('"c" $50)))))) '('('"_logical_id" '2331) '('"_id" '"371b7afd-7b4e41ee-7db35fd0-b57a801b"))))
(let $14 '($6 $11 $13))
(let $15 '('"SearchEngineID" '"SearchPhrase" '"c"))
(let $16 (DqCnResult (TDqOutput $13 '0) $15))
(return (KqpPhysicalQuery '((KqpPhysicalTx $14 '($16) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType $1 $2 '('"c" $3))) '0 '0)) '('('"type" '"query"))))
)
