(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '('NativeYtTypeFlags '0))
(let $3 '('StrictSchema '1))
(let $4 '('UniqueKeys '0))
(let $5 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" 'false)))))
(let $6 '('ChunkCount '1))
(let $7 '('ModifyTime '0))
(let $8 '('Revision '0))
(let $9 (lambda '() (block '(
  (let $54 '@@["StructType";[["Key1";["OptionalType";["DataType";"Int32"]]];["Key2";["OptionalType";["DataType";"String"]]];["Fk1";["OptionalType";["DataType";"String"]]];["Value";["OptionalType";["DataType";"String"]]]]]@@)
  (let $55 (YqlRowSpec $2 $3 $4 '('Type $54)))
  (let $56 (YtStat '('Id '"Input1") '('RecordsCount '"8") '('DataSize '"471") $6 $7 $8))
  (let $57 (YtTable '"Input1" $55 $5 $56 '() (Void) (Void) '"/Root/plato"))
  (let $58 '('"Fk1" '"Key1" '"Key2" '"Value"))
  (let $59 (YtReadTable! world $1 '((YtSection '((YtPath $57 $58 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $59 '())))
))))
(let $10 '('"_logical_id" '1645))
(let $11 (DataType 'String))
(let $12 (OptionalType $11))
(let $13 (OptionalType (DataType 'Int32)))
(let $14 (StructType '('"Fk1" $12) '('"Key1" $13) '('"Key2" $12) '('"Value" $12)))
(let $15 '('"_wide_channels" $14))
(let $16 '($10 '('"_id" '"41bc155a-7a399523-56e491c5-11332d5b") $15))
(let $17 (DqPhyStage '() $9 $16))
(let $18 '@@["StructType";[["Key";["DataType";"String"]];["Value";["OptionalType";["DataType";"Int32"]]]]]@@)
(let $19 (YqlRowSpec $2 $3 $4 '('Type $18)))
(let $20 (YtStat '('Id '"Input2") '('RecordsCount '3) '('DataSize '"87") $6 $7 $8))
(let $21 (YtTable '"Input2" $19 $5 $20 '() (Void) (Void) '"/Root/plato"))
(let $22 '('"Key" $11))
(let $23 '('('"_logical_id" '1609) '('"_id" '"87297ecb-b63a876a-4f87fd7e-21a4c7db") '('"_wide_channels" (StructType $22 '('"Value" $13)))))
(let $24 (DqPhyStage '() (lambda '() (block '(
  (let $60 (YtReadTable! world $1 '((YtSection '((YtPath $21 '('"Key" '"Value") (Void) (Void))) '()))))
  (return (FromFlow (WideFilter (DqReadWideWrap $60 '()) (lambda '($61 $62) (Not (Exists $62))))))
))) $23))
(let $25 (DqCnMap (TDqOutput $17 '0)))
(let $26 (DqCnBroadcast (TDqOutput $24 '0)))
(let $27 '('0))
(let $28 '('"Key"))
(let $29 '('0 '0 '1 '1 '2 '2 '3 '3))
(let $30 '('"t1.Fk1"))
(let $31 '('"t2.Key"))
(let $32 (StructType '('"t1.Fk1" $12) '('"t1.Key1" $13) '('"t1.Key2" $12) '('"t1.Value" $12) '('"t2.Key" $12) '('"t2.Value" $13)))
(let $33 '('"_wide_channels" $32))
(let $34 '('('"_logical_id" '1751) '('"_id" '"b80edf87-3f258861-68e6a1dd-5f9c8c6b") $33))
(let $35 (DqPhyStage '($25 $26) (lambda '($63 $64) (block '(
  (let $65 '('Many 'Hashed 'Compact))
  (let $66 (NarrowSqueezeToDict (ToFlow $64) (lambda '($68 $69) $68) (lambda '($70 $71) (AsStruct '('"Key" $70) '('"Value" $71))) $65))
  (let $67 (lambda '($78 $79 $80 $81 $82 $83) $78 $79 $80 $81 (Just $82) $83))
  (return (FromFlow (WideMap (FlatMap $66 (lambda '($72) (block '(
    (let $73 '('"Key" '4 '"Value" '5))
    (return (MapJoinCore (WideFilter (ToFlow $63) (lambda '($74 $75 $76 $77) (Exists $74))) $72 '"Inner" $27 $28 $29 $73 $30 $31))
  )))) $67)))
))) $34))
(let $36 '($10 '('"_id" '"71291a49-37c3fde6-7342913a-eb5819b1") $15))
(let $37 (DqPhyStage '() $9 $36))
(let $38 '('('"_logical_id" '1545) '('"_id" '"d54b0ef8-ac34e626-bddf5639-d266bd88") '('"_wide_channels" (StructType $22))))
(let $39 (DqPhyStage '() (lambda '() (block '(
  (let $84 (YtReadTable! world $1 '((YtSection '((YtPath $21 $28 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $84 '())))
))) $38))
(let $40 (DqCnMap (TDqOutput $37 '0)))
(let $41 (DqCnBroadcast (TDqOutput $39 '0)))
(let $42 '('('"_logical_id" '1858) '('"_id" '"10d384b9-5669d738-70c41d1f-1c525f28") $33))
(let $43 (DqPhyStage '($40 $41) (lambda '($85 $86) (block '(
  (let $87 '('One 'Hashed 'Compact))
  (let $88 (NarrowSqueezeToDict (ToFlow $86) (lambda '($90) $90) (lambda '($91) (Void)) $87))
  (let $89 (lambda '($93 $94 $95 $96) $93 $94 $95 $96 (Nothing $12) (Nothing $13)))
  (return (FromFlow (WideMap (FlatMap $88 (lambda '($92) (MapJoinCore (ToFlow $85) $92 '"LeftOnly" $27 $28 $29 '() $30 $31))) $89)))
))) $42))
(let $44 (DqCnParallelUnionAll (TDqOutput $35 '0)))
(let $45 (DqCnParallelUnionAll (TDqOutput $43 '0)))
(let $46 (lambda '($102 $103 $104 $105 $106 $107) (AsStruct '('"t1.Fk1" $102) '('"t1.Key1" $103) '('"t1.Key2" $104) '('"t1.Value" $105) '('"t2.Key" $106) '('"t2.Value" $107))))
(let $47 '('('"_logical_id" '1944) '('"_id" '"18a2c22b-57a75687-27dc2af7-cb90d07a") $33))
(let $48 (DqPhyStage '($44 $45) (lambda '($97 $98) (block '(
  (let $99 (Bool 'true))
  (let $100 (Sort (Extend (NarrowMap (ToFlow $97) $46) (NarrowMap (ToFlow $98) $46)) '($99 $99) (lambda '($108) '((Member $108 '"t1.Key1") (Member $108 '"t1.Key2")))))
  (let $101 (lambda '($109) (Member $109 '"t1.Fk1") (Member $109 '"t1.Key1") (Member $109 '"t1.Key2") (Member $109 '"t1.Value") (Member $109 '"t2.Key") (Member $109 '"t2.Value")))
  (return (FromFlow (ExpandMap $100 $101)))
))) $47))
(let $49 (DqCnMerge (TDqOutput $48 '0) '('('1 '"Asc") '('2 '"Asc"))))
(let $50 (DqPhyStage '($49) (lambda '($110) (FromFlow (NarrowMap (ToFlow $110) $46))) '('('"_logical_id" '1956) '('"_id" '"d194d8a1-f5df859e-cc03caeb-bdd26551"))))
(let $51 '($17 $24 $35 $37 $39 $43 $48 $50))
(let $52 '('"t1.Key1" '"t1.Key2" '"t1.Fk1" '"t1.Value" '"t2.Key" '"t2.Value"))
(let $53 (DqCnResult (TDqOutput $50 '0) $52))
(return (KqpPhysicalQuery '((KqpPhysicalTx $51 '($53) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $32) '0 '0)) '('('"type" '"query"))))
)
