(
(declare %kqp%tx_result_binding_0_0 (OptionalType (StructType '('UDAF0 (DataType 'Uint32)))))
(let $1 (Bool 'false))
(let $2 (DataType 'Uint32))
(let $3 '('('"_logical_id" '2427) '('"_id" '"43933059-cc657ce-4e6acff0-add54875") '('"_wide_channels" (StructType '('_yql_agg_0 $2)))))
(let $4 (DqPhyStage '() (lambda '() (block '(
  (let $16 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $17 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $16)))
  (let $18 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" 'false)))))
  (let $19 (YtStat '('Id '"Input") '('RecordsCount '"4") '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $20 (YtTable '"Input" $17 $18 $19 '() (Void) (Void) '"/Root/plato"))
  (let $21 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $20 '('"key") (Void) (Void))) '()))))
  (let $22 (Condense1 (NarrowMap (DqReadWideWrap $21 '()) (lambda '($23) (AsStruct '('"key" $23)))) (lambda '($24) (Size (Member $24 '"key"))) (lambda '($25 $26) $1) (lambda '($27 $28) (+ (Size (Member $27 '"key")) $28))))
  (return (FromFlow (ExpandMap $22 (lambda '($29) $29))))
))) $3))
(let $5 (DqCnUnionAll (TDqOutput $4 '0)))
(let $6 (OptionalType (StructType '('UDAF0 $2))))
(let $7 (DqPhyStage '($5) (lambda '($30) (block '(
  (let $31 (Condense1 (NarrowMap (ToFlow $30) (lambda '($32) (AsStruct '('_yql_agg_0 $32)))) (lambda '($33) (Member $33 '_yql_agg_0)) (lambda '($34 $35) $1) (lambda '($36 $37) (+ (Member $36 '_yql_agg_0) $37))))
  (return (FromFlow (Condense (Map (Take $31 (Uint64 '1)) (lambda '($38) (AsStruct '('UDAF0 $38)))) (Nothing $6) (lambda '($39 $40) $1) (lambda '($41 $42) (Just $41)))))
))) '('('"_logical_id" '2693) '('"_id" '"ed1abf3c-ff0a2956-93f8b04b-11ed1ee4"))))
(let $8 (DqCnValue (TDqOutput $7 '0)))
(let $9 (KqpPhysicalTx '($4 $7) '($8) '() '('('"type" '"compute"))))
(let $10 '"%kqp%tx_result_binding_0_0")
(let $11 '('('"_logical_id" '2743) '('"_id" '"7871f93f-d4542a2c-cf938409-cfeb3f29") '('"_partition_mode" '"single")))
(let $12 (DqPhyStage '() (lambda '() (Iterator (AsList (AsStruct '('"column0" (Coalesce (Member %kqp%tx_result_binding_0_0 'UDAF0) (Uint32 '0))))))) $11))
(let $13 (DqCnResult (TDqOutput $12 '0) '('"column0")))
(let $14 (KqpTxResultBinding $6 '0 '0))
(let $15 (KqpPhysicalTx '($12) '($13) '('($10 $14)) '('('"type" '"generic"))))
(return (KqpPhysicalQuery '($9 $15) '((KqpTxResultBinding (ListType (StructType '('"column0" $2))) '1 '0)) '('('"type" '"query"))))
)
