(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '@@["StructType";[["key";["DataType";"Int32"]];["optkey";["OptionalType";["DataType";"Int32"]]];["value";["DataType";"String"]]]]@@)
(let $3 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $2)))
(let $4 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" 'false)))))
(let $5 (YtStat '('Id '"Input") '('RecordsCount '"21") '('DataSize '"778") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
(let $6 (YtTable '"Input" $3 $4 $5 '() (Void) (Void) '"/Root/plato"))
(let $7 (YtReadTable! world $1 '((YtSection '((YtPath $6 '('"key" '"optkey") (Void) (Void))) '()))))
(let $8 (DqReadWideWrap $7 '()))
(let $9 '('"_logical_id" '12920))
(let $10 (DataType 'Int32))
(let $11 '('"key" $10))
(let $12 (OptionalType $10))
(let $13 '('"optkey" $12))
(let $14 '($9 '('"_id" '"f9fcd017-a069e63-8757da8a-af59d75b") '('"_wide_channels" (StructType $11 $13))))
(let $15 (DqPhyStage '() (lambda '() (FromFlow $8)) $14))
(let $16 (Bool 'false))
(let $17 (Int32 '"20"))
(let $18 (lambda '($101 $102) $101))
(let $19 (lambda '() (FromFlow (WideMap (WideFilter $8 (lambda '($99 $100) (And (Coalesce (>= $100 (Int32 '"8")) $16) (Coalesce (<= $100 $17) $16)))) $18))))
(let $20 (StructType $11))
(let $21 '('"_wide_channels" $20))
(let $22 '($9 '('"_id" '"3e72eb29-7828f60e-14deabf3-524c67b8") $21))
(let $23 (DqPhyStage '() $19 $22))
(let $24 (DqCnUnionAll (TDqOutput $23 '0)))
(let $25 '('('"_logical_id" '9968) '('"_id" '"4f564adf-84ea44cc-e0d14527-b7f9e3e0") $21))
(let $26 (DqPhyStage '($24) (lambda '($103) $103) $25))
(let $27 '('"optkey"))
(let $28 (YtReadTable! world $1 '((YtSection '((YtPath $6 $27 (Void) (Void))) '()))))
(let $29 (DqReadWideWrap $28 '()))
(let $30 (Int32 '"4"))
(let $31 '('"_logical_id" '12608))
(let $32 '('"_wide_channels" (StructType $13)))
(let $33 '($31 '('"_id" '"a8c5e278-2aaa5981-e0e4d72a-2dc44da") $32))
(let $34 (DqPhyStage '() (lambda '() (FromFlow (WideFilter $29 (lambda '($104) (And (Coalesce (>= $104 $30) $16) (Coalesce (<= $104 $17) $16)))))) $33))
(let $35 '($9 '('"_id" '"df38b6bc-4ca57b52-b715f0b2-d9002efd") $21))
(let $36 (DqPhyStage '() (lambda '() (FromFlow (WideMap (WideFilter $8 (lambda '($105 $106) (And (Coalesce (>= $106 (Int32 '"6")) $16) (Coalesce (<= $106 $17) $16)))) $18))) $35))
(let $37 (DqCnMap (TDqOutput $15 '0)))
(let $38 (DqCnBroadcast (TDqOutput $26 '0)))
(let $39 (DqCnBroadcast (TDqOutput $34 '0)))
(let $40 (DqCnBroadcast (TDqOutput $36 '0)))
(let $41 '($37 $38 $39 $40))
(let $42 (lambda '($114) $114))
(let $43 (lambda '($115) (Void)))
(let $44 '('One 'Hashed 'Compact))
(let $45 (lambda '($119) (Exists $119)))
(let $46 (lambda '($120) $120))
(let $47 (lambda '($123) (AsStruct '('"key" $123))))
(let $48 (Uint64 '0))
(let $49 '('Auto 'One 'Compact))
(let $50 (Int32 '1))
(let $51 '('0))
(let $52 '('1 '0 '2 '1))
(let $53 '('"_yql_injoin_input._yql_injoin_column_0"))
(let $54 '('"_yql_injoin_0.optkey"))
(let $55 '('"key"))
(let $56 '('"_yql_injoin_1.key"))
(let $57 (Int32 '"3"))
(let $58 (StructType '('_yql_injoin_column_0 $12) '('_yql_injoin_column_1 $10) $11 $13))
(let $59 '('('"_logical_id" '11547) '('"_id" '"d58fac8c-34f1dfbd-dec9750-e4aebe00") '('"_wide_channels" $58)))
(let $60 (DqPhyStage $41 (lambda '($107 $108 $109 $110) (block '(
  (let $111 (NarrowSqueezeToDict (ToFlow $110) $42 $43 $44))
  (let $112 (lambda '($134 $135) $134 $135 (+ $135 $57)))
  (let $113 (lambda '($139 $140 $141) $141 (+ $139 $30) $139 $140))
  (return (FromFlow (WideMap (WideFilter (WideMap (FlatMap $111 (lambda '($116) (block '(
    (let $117 (SqueezeToDict (NarrowFlatMap (WideFilter (ToFlow $109) $45) $46) $42 $43 $44))
    (let $118 '('0 '0 '1 '1))
    (return (MapJoinCore (WideFilter (FlatMap $117 (lambda '($121) (block '(
      (let $122 (lambda '($130 $131) (+ $130 $50) $130 $131))
      (return (MapJoinCore (WideMap (FlatMap (SqueezeToList (NarrowMap (ToFlow $108) $47) $48) (lambda '($124) (WideFilter (ToFlow $107) (lambda '($125 $126) (block '(
        (let $127 (ToDict $124 (lambda '($128) (Member $128 '"key")) (lambda '($129) (Void)) $49))
        (return (And (Exists $126) (Contains $127 $125)))
      )))))) $122) $121 'LeftSemi $51 $27 $52 '() $53 $54))
    )))) (lambda '($132 $133) (Exists $133))) $116 'LeftSemi '('1) $55 $118 '() '('"_yql_injoin_input.optkey") $56))
  )))) $112) (lambda '($136 $137 $138) (Exists $138))) $113)))
))) $59))
(let $61 (lambda '() (FromFlow (WideFilter $29 (lambda '($142) (And (Coalesce (>= $142 $50) $16) (Coalesce (<= $142 (Int32 '"16")) $16)))))))
(let $62 '($31 '('"_id" '"f7248386-28542435-4deec6cb-31699816") $32))
(let $63 (DqPhyStage '() $61 $62))
(let $64 (DqCnUnionAll (TDqOutput $63 '0)))
(let $65 (lambda '($143) $143))
(let $66 '('('"_logical_id" '12376) '('"_id" '"441a12fa-6bf7fd57-b2dc5cde-fc853226") $32))
(let $67 (DqPhyStage '($64) $65 $66))
(let $68 '($31 '('"_id" '"3857dc19-51e3050a-8e00f719-16acf012") $32))
(let $69 (DqPhyStage '() $61 $68))
(let $70 (DqCnUnionAll (TDqOutput $69 '0)))
(let $71 '('('"_logical_id" '12411) '('"_id" '"1d37a855-3b26d4a3-ba7d8c01-82fe0f5b") $32))
(let $72 (DqPhyStage '($70) $65 $71))
(let $73 (lambda '() (FromFlow (WideFilter $29 (lambda '($144) (And (Coalesce (>= $144 (Int32 '"10")) $16) (Coalesce (<= $144 $17) $16)))))))
(let $74 '($31 '('"_id" '"1ae80174-76a3ece6-7d2c5143-76480889") $32))
(let $75 (DqPhyStage '() $73 $74))
(let $76 (lambda '() (FromFlow (WideMap (WideFilter $8 (lambda '($145 $146) (And (Coalesce (>= $146 $50) $16) (Coalesce (<= $146 (Int32 '"12")) $16)))) $18))))
(let $77 '($9 '('"_id" '"d9e5a7ae-4759e990-eaad4fc8-a7c768d3") $21))
(let $78 (DqPhyStage '() $76 $77))
(let $79 '($31 '('"_id" '"d495e3a9-d989ea25-72cd808-9199b310") $32))
(let $80 (DqPhyStage '() $73 $79))
(let $81 '($9 '('"_id" '"afdfbbf-bb449edb-f6e3094-589b164c") $21))
(let $82 (DqPhyStage '() $76 $81))
(let $83 '($9 '('"_id" '"d9bd9886-714ac0f6-9fb46b3d-c750efee") $21))
(let $84 (DqPhyStage '() $19 $83))
(let $85 (DqCnMap (TDqOutput $60 '0)))
(let $86 (DqCnBroadcast (TDqOutput $67 '0)))
(let $87 (DqCnBroadcast (TDqOutput $72 '0)))
(let $88 (DqCnBroadcast (TDqOutput $75 '0)))
(let $89 (DqCnBroadcast (TDqOutput $78 '0)))
(let $90 (DqCnBroadcast (TDqOutput $80 '0)))
(let $91 (DqCnBroadcast (TDqOutput $82 '0)))
(let $92 (DqCnBroadcast (TDqOutput $84 '0)))
(let $93 '($85 $86 $87 $88 $89 $90 $91 $92))
(let $94 (DqPhyStage $93 (lambda '($147 $148 $149 $150 $151 $152 $153 $154) (block '(
  (let $155 (NarrowSqueezeToDict (ToFlow $154) $42 $43 $44))
  (return (FromFlow (NarrowMap (FlatMap $155 (lambda '($156) (block '(
    (let $157 (NarrowSqueezeToDict (ToFlow $153) $42 $43 $44))
    (let $158 '('1 '0))
    (let $159 '('"_yql_injoin_input._yql_injoin_column_1"))
    (return (MapJoinCore (FlatMap $157 (lambda '($160) (block '(
      (let $161 (SqueezeToDict (NarrowFlatMap (WideFilter (ToFlow $152) $45) $46) $42 $43 $44))
      (let $162 (lambda '($199) (- $199 $50) (- $199 $57) $199))
      (return (MapJoinCore (WideMap (FlatMap $161 (lambda '($163) (block '(
        (let $164 (NarrowSqueezeToDict (ToFlow $151) $42 $43 $44))
        (return (MapJoinCore (FlatMap $164 (lambda '($165) (block '(
          (let $166 (SqueezeToDict (NarrowFlatMap (WideFilter (ToFlow $150) $45) $46) $42 $43 $44))
          (return (MapJoinCore (FlatMap $166 (lambda '($167) (block '(
            (let $168 (lambda '($170) (AsStruct '('"optkey" $170))))
            (let $169 (lambda '($192 $193 $194 $195) $192 $193 $194))
            (return (MapJoinCore (WideFilter (WideMap (FlatMap (SqueezeToList (NarrowMap (ToFlow $149) $168) $48) (lambda '($171) (FlatMap (SqueezeToList (NarrowMap (ToFlow $148) $168) $48) (lambda '($172) (WideFilter (ToFlow $147) (lambda '($173 $174 $175 $176) (block '(
              (let $177 (lambda '($190) (Member $190 '"optkey")))
              (let $178 (lambda '($191) (Void)))
              (let $179 (ToDict $172 $177 $178 $49))
              (let $180 (Bool 'true))
              (let $181 (Nothing (OptionalType (DataType 'Bool))))
              (let $182 (Just $16))
              (let $183 (If (HasItems (SkipWhile (DictKeys $179) $45)) $181 $182))
              (let $184 (If (Contains $179 $176) (Just $180) $183))
              (let $185 (If (HasItems $179) $181 $182))
              (let $186 (If (Exists $176) $184 $185))
              (let $187 (ToDict $171 $177 $178 $49))
              (let $188 (If (HasItems (SkipWhile (DictKeys $187) $45)) $16 $16))
              (let $189 (If (Contains $187 (Just $175)) $180 $188))
              (return (Or (Coalesce $186 $16) $189))
            )))))))) $169) (lambda '($196 $197 $198) (Exists $196))) $167 'LeftSemi $51 $27 $52 '() $53 $54))
          )))) $165 'LeftOnly $51 $55 $158 '() $159 $56))
        )))) $163 'LeftSemi $51 $27 '('0 '0) '() '('"_yql_injoin_input.key") '('"_yql_injoin_2.optkey")))
      )))) $162) $160 'LeftSemi $51 $55 $52 '() $53 '('"_yql_injoin_0.key")))
    )))) $156 'LeftOnly $51 $55 $158 '() $159 $56))
  )))) $47)))
))) '('('"_logical_id" '14746) '('"_id" '"daf99710-7c7a7064-5f4c4c49-f7f53443"))))
(let $95 (DqCnUnionAll (TDqOutput $94 '0)))
(let $96 (DqPhyStage '($95) (lambda '($200) $200) '('('"_logical_id" '17012) '('"_id" '"9f50fbc3-1392c65e-60d3b536-49ca665a"))))
(let $97 '($15 $23 $26 $34 $36 $60 $63 $67 $69 $72 $75 $78 $80 $82 $84 $94 $96))
(let $98 (DqCnResult (TDqOutput $96 '0) $55))
(return (KqpPhysicalQuery '((KqpPhysicalTx $97 '($98) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $20) '0 '0)) '('('"type" '"query"))))
)
