(
(let $1 (DataType 'Double))
(let $2 (Bool 'false))
(let $3 (lambda '($34) $34))
(let $4 '('('"_logical_id" '1682) '('"_id" '"a3e21c30-f5a6913a-2bb4855e-8044bc91") '('"_wide_channels" (StructType '('_yql_agg_0 $1)))))
(let $5 (DqPhyStage '() (lambda '() (block '(
  (let $9 (KqpTable '"/local/test_db/olap_yatests/tpch/s1/lineitem" '"72075186224037897:10" '"" '1))
  (let $10 '('"l_discount" '"l_extendedprice" '"l_quantity" '"l_shipdate"))
  (let $11 (KqpBlockReadOlapTableRanges $9 (Void) $10 '() '() (lambda '($14) (block '(
    (let $15 '('gte '"l_discount" (Double '"0.0499999")))
    (let $16 '('lte '"l_discount" (Double '"0.0700001")))
    (let $17 '('lt '"l_quantity" (Int32 '"24")))
    (let $18 (StructType '('"l_discount" $1) '('"l_extendedprice" $1) '('"l_quantity" $1) '('"l_shipdate" (DataType 'Date32))))
    (let $19 '('"l_shipdate"))
    (let $20 (KqpOlapApply $18 $19 '() (lambda '($23) (>= $23 (Date '"8766")))))
    (let $21 (KqpOlapApply $18 $19 '() (lambda '($24) (Coalesce (< $24 (Just (Date '"9131"))) $2))))
    (let $22 (KqpOlapAnd $15 $16 $17 $20 $21))
    (return (TKqpOlapExtractMembers (KqpOlapFilter $14 $22) '('"l_discount" '"l_extendedprice")))
  )))))
  (let $12 (lambda '($25 $26 $27) (BlockAsStruct '('"l_discount" $25) '('"l_extendedprice" $26)) $27))
  (let $13 (Condense1 (NarrowMap (ToFlow (WideFromBlocks (FromFlow (WideMap $11 $12)))) (lambda '($28) $28)) (lambda '($29) (* (Member $29 '"l_extendedprice") (Member $29 '"l_discount"))) (lambda '($30 $31) $2) (lambda '($32 $33) (AggrAdd (* (Member $32 '"l_extendedprice") (Member $32 '"l_discount")) $33))))
  (return (FromFlow (ExpandMap $13 $3)))
))) $4))
(let $6 (DqCnUnionAll (TDqOutput $5 '0)))
(let $7 (DqPhyStage '($6) (lambda '($35) (block '(
  (let $36 (WideCondense1 (ToFlow $35) $3 (lambda '($38 $39) $2) (lambda '($40 $41) (AggrAdd $40 $41))))
  (let $37 (Condense (NarrowMap (Take $36 (Uint64 '1)) (lambda '($42) (AsStruct '('Sum0 $42)))) (Nothing (OptionalType (StructType '('Sum0 $1)))) (lambda '($43 $44) $2) (lambda '($45 $46) (Just $45))))
  (return (FromFlow (Map $37 (lambda '($47) (AsStruct '('"revenue" (Member $47 'Sum0)))))))
))) '('('"_logical_id" '3013) '('"_id" '"27b8e3fb-62467931-53f11e7d-22028650"))))
(let $8 (DqCnResult (TDqOutput $7 '0) '('"revenue")))
(return (KqpPhysicalQuery '((KqpPhysicalTx '($5 $7) '($8) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType '('"revenue" (OptionalType $1)))) '0 '0)) '('('"type" '"query"))))
)
