(
(declare %kqp%tx_result_binding_0_0 (OptionalType (StructType '('Max0 (DataType 'Date32)) '('Min0 (DataType 'Date32)))))
(let $1 (DataType 'Date32))
(let $2 '('('"_logical_id" '1586) '('"_id" '"e613b923-f6135919-e398a6e5-c49b4c9f") '('"_wide_channels" (StructType '('_yql_agg_0 $1) '('_yql_agg_1 $1)))))
(let $3 (DqPhyStage '() (lambda '() (block '(
  (let $17 (KqpTable '"/local/test_db/olap_yatests/clickbench/hits" '"72075186224037897:8" '"" '1))
  (let $18 (KqpBlockReadOlapTableRanges $17 (Void) '('"EventDate") '() '() (lambda '($20) (block '(
    (let $21 '('_yql_agg_0 'max '"EventDate"))
    (let $22 '('_yql_agg_1 'min '"EventDate"))
    (return (TKqpOlapAgg $20 '($21 $22) '()))
  )))))
  (let $19 (lambda '($23 $24 $25) (block '(
    (let $26 (BlockAsStruct '('_yql_agg_0 $23) '('_yql_agg_1 $24)))
    (return (BlockMember $26 '_yql_agg_0) (BlockMember $26 '_yql_agg_1) $25)
  ))))
  (return (WideFromBlocks (FromFlow (WideMap $18 $19))))
))) $2))
(let $4 (DqCnUnionAll (TDqOutput $3 '0)))
(let $5 (OptionalType (StructType '('Max0 $1) '('Min0 $1))))
(let $6 (DqPhyStage '($4) (lambda '($27) (block '(
  (let $28 (lambda '($32 $33) $32 $33))
  (let $29 (Bool 'false))
  (let $30 (lambda '($38 $39 $40 $41) (AggrMax $38 $40) (AggrMin $39 $41)))
  (let $31 (WideCondense1 (ToFlow $27) $28 (lambda '($34 $35 $36 $37) $29) $30))
  (return (FromFlow (Condense (NarrowMap (Take $31 (Uint64 '1)) (lambda '($42 $43) (AsStruct '('Max0 $42) '('Min0 $43)))) (Nothing $5) (lambda '($44 $45) $29) (lambda '($46 $47) (Just $46)))))
))) '('('"_logical_id" '2121) '('"_id" '"b7bfe3eb-1122aa78-a0b2afa4-42587440"))))
(let $7 (DqCnValue (TDqOutput $6 '0)))
(let $8 '('('"type" '"generic")))
(let $9 (KqpPhysicalTx '($3 $6) '($7) '() $8))
(let $10 '"%kqp%tx_result_binding_0_0")
(let $11 '('('"_logical_id" '2229) '('"_id" '"6f013ca-d4d0afe7-409f5b5a-8d4ad329") '('"_partition_mode" '"single")))
(let $12 (DqPhyStage '() (lambda '() (block '(
  (let $48 %kqp%tx_result_binding_0_0)
  (return (Iterator (AsList (AsStruct '('"column0" (Member $48 'Min0)) '('"column1" (Member $48 'Max0))))))
))) $11))
(let $13 (DqCnResult (TDqOutput $12 '0) '('"column0" '"column1")))
(let $14 (KqpTxResultBinding $5 '0 '0))
(let $15 (KqpPhysicalTx '($12) '($13) '('($10 $14)) $8))
(let $16 (OptionalType $1))
(return (KqpPhysicalQuery '($9 $15) '((KqpTxResultBinding (ListType (StructType '('"column0" $16) '('"column1" $16))) '1 '0)) '('('"type" '"query"))))
)
