(
(let $1 (DataType 'String))
(let $2 (DqPhyStage '() (lambda '() (block '(
  (let $10 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $11 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $10)))
  (let $12 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('HasRLS '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $13 (YtStat '('Id '"Input1") '('RecordsCount '"4") '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $14 (YtTable '"Input1" $11 $12 $13 '() (Void) (Void) '"/Root/plato"))
  (let $15 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $14 '('"key" '"subkey") (Void) (Void) (Void))) '()))))
  (return (FromFlow (NarrowFlatMap (DqReadWideWrap $15 '()) (lambda '($16 $17) (block '(
    (let $18 (AsStruct '('"key" $16)))
    (let $19 (StructType '('"key" $1)))
    (let $20 (VariantType (TupleType $19 $19)))
    (let $21 (List (ListType $20)))
    (let $22 (If (!= $17 (String '"foo")) (AsList (Variant $18 '0 $20)) $21))
    (let $23 (If (!= $17 (String '"bar")) (AsList (Variant $18 '1 $20)) $21))
    (return (Extend $22 $23))
  ))))))
))) '('('"_logical_id" '1878) '('"_id" '"2b2bfa86-4f681c60-1a4e31a1-d071a79d"))))
(let $3 (DqCnMap (TDqOutput $2 '1)))
(let $4 (DqCnBroadcast (TDqOutput $2 '0)))
(let $5 (DqPhyStage '($3 $4) (lambda '($24 $25) (block '(
  (let $26 '('Many 'Hashed 'Compact))
  (let $27 (SqueezeToDict (Map (ToFlow $25) (lambda '($28) '((Member $28 '"key") $28))) (lambda '($29) (Nth $29 '0)) (lambda '($30) (Nth $30 '1)) $26))
  (return (FromFlow (Map (Filter (FlatMap $27 (lambda '($31) (block '(
    (let $32 '('"key"))
    (return (MapJoinCore (ToFlow $24) $31 'Inner $32 $32 '('"key" '"a.key") '('"key" '"b.key") '('"a.key") '('"b.key")))
  )))) (lambda '($33) (Or (!= (Member $33 '"a.key") (String '1)) (!= (Member $33 '"b.key") (String '"2"))))) (lambda '($34) (AsStruct '('"key1" (Member $34 '"a.key")))))))
))) '('('"_logical_id" '1974) '('"_id" '"498113df-e5a0ae3b-b24268a4-1db3fc88"))))
(let $6 (DqCnUnionAll (TDqOutput $5 '0)))
(let $7 (DqPhyStage '($6) (lambda '($35) $35) '('('"_logical_id" '2063) '('"_id" '"fc3d584f-b53394a1-db1f0fd3-890a7118"))))
(let $8 '($2 $5 $7))
(let $9 (DqCnResult (TDqOutput $7 '0) '('"key1")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $8 '($9) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType '('"key1" $1))) '0 '0)) '('('"type" '"query"))))
)
