(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '('NativeYtTypeFlags '0))
(let $3 '('StrictSchema '1))
(let $4 '('UniqueKeys '0))
(let $5 '@@["StructType";[["Key";["DataType";"String"]];["Value";["OptionalType";["DataType";"Int32"]]]]]@@)
(let $6 (YqlRowSpec $2 $3 $4 '('Type $5)))
(let $7 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" 'false)))))
(let $8 '('ChunkCount '1))
(let $9 '('ModifyTime '0))
(let $10 '('Revision '0))
(let $11 (OptionalType (DataType 'Int32)))
(let $12 '('"Value" $11))
(let $13 '('('"_logical_id" '2133) '('"_id" '"cdb9ae15-bc50c7f3-ba732cd7-e71ce72f") '('"_wide_channels" (StructType $12))))
(let $14 (DqPhyStage '() (lambda '() (block '(
  (let $37 (YtStat '('Id '"Input3") '('RecordsCount '1) '('DataSize '"31") $8 $9 $10))
  (let $38 (YtTable '"Input3" $6 $7 $37 '() (Void) (Void) '"/Root/plato"))
  (let $39 (YtReadTable! world $1 '((YtSection '((YtPath $38 '('"Value") (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $39 '())))
))) $13))
(let $15 (DqCnBroadcast (TDqOutput $14 '0)))
(let $16 (Bool 'false))
(let $17 (DataType 'String))
(let $18 (OptionalType $17))
(let $19 '('"t1.Fk1" $18))
(let $20 '('"t1.Key1" $11))
(let $21 '('"t1.Key2" $18))
(let $22 '('"t1.Value" $18))
(let $23 '('"t3.Value" $11))
(let $24 (StructType $19 $20 $21 $22 $23))
(let $25 '('('"_logical_id" '2218) '('"_id" '"12cd4134-5a03b8a5-1d769dfa-ff21fba") '('"_wide_channels" $24)))
(let $26 (DqPhyStage '($15) (lambda '($40) (block '(
  (let $41 (Condense1 (NarrowMap (ToFlow $40) (lambda '($43) (AsStruct '('"Value" $43)))) (lambda '($44) (AsList $44)) (lambda '($45 $46) $16) (lambda '($47 $48) (Append $48 $47))))
  (let $42 (lambda '($61) (Member $61 '"t1.Fk1") (Member $61 '"t1.Key1") (Member $61 '"t1.Key2") (Member $61 '"t1.Value") (Member $61 '"t3.Value")))
  (return (FromFlow (ExpandMap (FlatMap $41 (lambda '($49) (block '(
    (let $50 '@@["StructType";[["Key1";["OptionalType";["DataType";"Int32"]]];["Key2";["OptionalType";["DataType";"String"]]];["Fk1";["OptionalType";["DataType";"String"]]];["Value";["OptionalType";["DataType";"String"]]]]]@@)
    (let $51 (YqlRowSpec $2 $3 $4 '('Type $50)))
    (let $52 (YtStat '('Id '"Input1") '('RecordsCount '"8") '('DataSize '"471") $8 $9 $10))
    (let $53 (YtTable '"Input1" $51 $7 $52 '() (Void) (Void) '"/Root/plato"))
    (let $54 '('"Fk1" '"Key1" '"Key2" '"Value"))
    (let $55 (YtReadTable! world $1 '((YtSection '((YtPath $53 $54 (Void) (Void))) '()))))
    (return (NarrowFlatMap (DqReadWideWrap $55 '()) (lambda '($56 $57 $58 $59) (Map (Collect $49) (lambda '($60) (AsStruct '('"t1.Fk1" $56) '('"t1.Key1" $57) '('"t1.Key2" $58) '('"t1.Value" $59) '('"t3.Value" (Member $60 '"Value"))))))))
  )))) $42)))
))) $25))
(let $27 '('('"_logical_id" '2243) '('"_id" '"27146901-7c7616e6-7c4b4f8c-4f33e712") '('"_wide_channels" (StructType '('"Key" $17) $12))))
(let $28 (DqPhyStage '() (lambda '() (block '(
  (let $62 (YtStat '('Id '"Input2") '('RecordsCount '3) '('DataSize '"87") $8 $9 $10))
  (let $63 (YtTable '"Input2" $6 $7 $62 '() (Void) (Void) '"/Root/plato"))
  (let $64 (YtReadTable! world $1 '((YtSection '((YtPath $63 '('"Key" '"Value") (Void) (Void))) '()))))
  (return (FromFlow (WideFilter (DqReadWideWrap $64 '()) (lambda '($65 $66) (Coalesce (> $66 (Int32 '"1001")) $16)))))
))) $27))
(let $29 (DqCnMap (TDqOutput $26 '0)))
(let $30 (DqCnBroadcast (TDqOutput $28 '0)))
(let $31 (DqPhyStage '($29 $30) (lambda '($67 $68) (block '(
  (let $69 '('Many 'Hashed 'Compact))
  (let $70 (NarrowSqueezeToDict (ToFlow $68) (lambda '($71 $72) $71) (lambda '($73 $74) (AsStruct '('"Key" $73) '('"Value" $74))) $69))
  (return (FromFlow (NarrowMap (FlatMap $70 (lambda '($75) (block '(
    (let $76 '('0 '0 '1 '1 '2 '2 '3 '3 '4 '6))
    (let $77 '('"Key" '4 '"Value" '5))
    (return (MapJoinCore (WideFilter (ToFlow $67) (lambda '($78 $79 $80 $81 $82) (Exists $78))) $75 '"Inner" '('0) '('"Key") $76 $77 '('"t1.Fk1") '('"t2.Key")))
  )))) (lambda '($83 $84 $85 $86 $87 $88 $89) (AsStruct '('"t1.Fk1" $83) '('"t1.Key1" $84) '('"t1.Key2" $85) '('"t1.Value" $86) '('"t2.Key" (Just $87)) '('"t2.Value" $88) '('"t3.Value" $89))))))
))) '('('"_logical_id" '2344) '('"_id" '"91ff05a7-cff9d30b-1f38457e-be9c5989"))))
(let $32 (DqCnUnionAll (TDqOutput $31 '0)))
(let $33 (DqPhyStage '($32) (lambda '($90) $90) '('('"_logical_id" '2748) '('"_id" '"1042e3a5-9457294-e185eae6-9c024968"))))
(let $34 '($14 $26 $28 $31 $33))
(let $35 '('"t1.Key1" '"t1.Key2" '"t1.Fk1" '"t1.Value" '"t2.Key" '"t2.Value" '"t3.Value"))
(let $36 (DqCnResult (TDqOutput $33 '0) $35))
(return (KqpPhysicalQuery '((KqpPhysicalTx $34 '($36) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType $19 $20 $21 $22 '('"t2.Key" $18) '('"t2.Value" $11) $23)) '0 '0)) '('('"type" '"query"))))
)
