(
(declare %kqp%tx_result_binding_0_0 (OptionalType (StructType '('AggregateList0 (ListType (DataType 'Int32))))))
(let $1 (DataType 'Int32))
(let $2 (Bool 'false))
(let $3 (ListType $1))
(let $4 '('('"_logical_id" '2055) '('"_id" '"c51bfdf4-810e7504-c1598eb8-57069eaf") '('"_wide_channels" (StructType '('_yql_agg_0 $3)))))
(let $5 (DqPhyStage '() (lambda '() (block '(
  (let $17 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $18 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $17)))
  (let $19 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" 'false)))))
  (let $20 (YtStat '('Id '"Input") '('RecordsCount '"2") '('DataSize '"76") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $21 (YtTable '"Input" $18 $19 $20 '() (Void) (Void) '"/Root/plato"))
  (let $22 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $21 '('"value") (Void) (Void))) '()))))
  (let $23 (OptionalType $1))
  (let $24 (Condense1 (NarrowMap (DqReadWideWrap $22 '()) (lambda '($25) (AsStruct '('"value" $25)))) (lambda '($26) (ToList (SafeCast (Member $26 '"value") $23))) (lambda '($27 $28) $2) (lambda '($29 $30) (IfPresent (SafeCast (Member $29 '"value") $23) (lambda '($31) (Insert $30 $31)) $30))))
  (return (FromFlow (ExpandMap $24 (lambda '($32) $32))))
))) $4))
(let $6 (DqCnUnionAll (TDqOutput $5 '0)))
(let $7 (OptionalType (StructType '('AggregateList0 $3))))
(let $8 (DqPhyStage '($6) (lambda '($33) (block '(
  (let $34 (Condense1 (NarrowMap (ToFlow $33) (lambda '($35) (AsStruct '('_yql_agg_0 $35)))) (lambda '($36) (Member $36 '_yql_agg_0)) (lambda '($37 $38) $2) (lambda '($39 $40) (Extend (Member $39 '_yql_agg_0) $40))))
  (return (FromFlow (Condense (Map (Take $34 (Uint64 '1)) (lambda '($41) (AsStruct '('AggregateList0 $41)))) (Nothing $7) (lambda '($42 $43) $2) (lambda '($44 $45) (Just $44)))))
))) '('('"_logical_id" '2330) '('"_id" '"d9fb4e5d-9b78db17-b55add3a-f0cd880b"))))
(let $9 (DqCnValue (TDqOutput $8 '0)))
(let $10 (KqpPhysicalTx '($5 $8) '($9) '() '('('"type" '"compute"))))
(let $11 '"%kqp%tx_result_binding_0_0")
(let $12 '('('"_logical_id" '2380) '('"_id" '"1c369cc-76541d2c-603cf9e6-42e25d30") '('"_partition_mode" '"single")))
(let $13 (DqPhyStage '() (lambda '() (Iterator (AsList (AsStruct '('"val_list" (Coalesce (Member %kqp%tx_result_binding_0_0 'AggregateList0) (List $3))))))) $12))
(let $14 (DqCnResult (TDqOutput $13 '0) '('"val_list")))
(let $15 (KqpTxResultBinding $7 '0 '0))
(let $16 (KqpPhysicalTx '($13) '($14) '('($11 $15)) '('('"type" '"generic"))))
(return (KqpPhysicalQuery '($10 $16) '((KqpTxResultBinding (ListType (StructType '('"val_list" $3))) '1 '0)) '('('"type" '"query"))))
)
