(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '@@["StructType";[["key";["OptionalType";["DataType";"String"]]];["subkey";["OptionalType";["DataType";"String"]]];["value";["OptionalType";["DataType";"String"]]]]]@@)
(let $3 (Bool 'true))
(let $4 '('"key" '"subkey"))
(let $5 (DataType 'String))
(let $6 (OptionalType $5))
(let $7 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '1) '('Type $2) '('SortDirections '($3 $3)) '('SortMembers $4) '('SortedBy $4) '('SortedByTypes '($6 $6))))
(let $8 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '1)))
(let $9 '('RecordsCount '0))
(let $10 '('DataSize '0))
(let $11 '('ChunkCount '0))
(let $12 '('ModifyTime '0))
(let $13 '('Revision '0))
(let $14 '('"key" '"subkey" '"value"))
(let $15 (StructType '('"key" $6) '('"subkey" $6) '('"value" $6)))
(let $16 '('('"_logical_id" '916) '('"_id" '"6c4e1c1c-ba46dda6-7ea183d8-17f2332f") '('"_wide_channels" $15)))
(let $17 (DqPhyStage '() (lambda '() (block '(
  (let $24 (YtStat '('Id '"Input2") $9 $10 $11 $12 $13))
  (let $25 (YtTable '"Input2" $7 $8 $24 '() (Void) (Void) '"/Root/plato"))
  (let $26 (YtReadTable! world $1 '((YtSection '((YtPath $25 $14 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $26 '())))
))) $16))
(let $18 (DqCnBroadcast (TDqOutput $17 '0)))
(let $19 (DqPhyStage '($18) (lambda '($27) (block '(
  (let $28 (lambda '($31 $32 $33) (Exists $31)))
  (let $29 '('Many 'Hashed 'Compact))
  (let $30 (SqueezeToDict (NarrowFlatMap (WideFilter (ToFlow $27) $28) (lambda '($34 $35 $36) (IfPresent $34 (lambda '($37) (block '(
    (let $38 (AsStruct '('"key" $34) '('"subkey" $35) '('"value" $36)))
    (return (Just '($37 $38)))
  ))) (Nothing (OptionalType (TupleType $5 $15)))))) (lambda '($39) (Nth $39 '0)) (lambda '($40) (Nth $40 '1)) $29))
  (return (FromFlow (NarrowMap (FlatMap $30 (lambda '($41) (block '(
    (let $42 (YtStat '('Id '"Input1") $9 $10 $11 $12 $13))
    (let $43 (YtTable '"Input1" $7 $8 $42 '() (Void) (Void) '"/Root/plato"))
    (let $44 (YtReadTable! world $1 '((YtSection '((YtPath $43 $14 (Void) (Void))) '()))))
    (let $45 '('0 '0 '1 '1 '2 '2))
    (let $46 '('"key" '3 '"subkey" '4 '"value" '5))
    (return (MapJoinCore (WideFilter (DqReadWideWrap $44 '()) $28) $41 'Inner '('0) '('"key") $45 $46 '('"A.key") '('"B.key")))
  )))) (lambda '($47 $48 $49 $50 $51 $52) (AsStruct '('"A.key" $47) '('"A.subkey" $48) '('"A.value" $49) '('"B.key" $50) '('"B.subkey" $51) '('"B.value" $52))))))
))) '('('"_logical_id" '975) '('"_id" '"e83cc93d-f7aff835-566b1766-5ee06ca"))))
(let $20 (DqCnUnionAll (TDqOutput $19 '0)))
(let $21 (DqPhyStage '($20) (lambda '($53) $53) '('('"_logical_id" '1132) '('"_id" '"e233b513-306d63f6-7235c01a-81efc4d7"))))
(let $22 '($17 $19 $21))
(let $23 (DqCnResult (TDqOutput $21 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx $22 '($23) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType '('"A.key" $6) '('"A.subkey" $6) '('"A.value" $6) '('"B.key" $6) '('"B.subkey" $6) '('"B.value" $6))) '0 '0)) '('('"type" '"query"))))
)
