(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["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 '"3") '('DataSize '"132") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
(let $6 (YtTable '"Input" $3 $4 $5 '() (Void) (Void) '"/Root/plato"))
(let $7 (DataType 'String))
(let $8 (StructType '('"key" $7) '('"subkey" $7) '('"value" $7)))
(let $9 '('('"_logical_id" '1727) '('"_id" '"3ba28b1-417a395e-c0ab4526-5f89e95d") '('"_wide_channels" $8)))
(let $10 (DqPhyStage '() (lambda '() (block '(
  (let $20 '('"key" '"subkey" '"value"))
  (let $21 (YtReadTable! world $1 '((YtSection '((YtPath $6 $20 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $21 '())))
))) $9))
(let $11 (DqCnBroadcast (TDqOutput $10 '0)))
(let $12 (StructType '('"ib.key" $7) '('"ib.subkey" $7) '('"ib.value" $7)))
(let $13 '('('"_logical_id" '1905) '('"_id" '"21483e01-829a64c9-f0f8309b-d3f87aa1") '('"_wide_channels" $12)))
(let $14 (DqPhyStage '($11) (lambda '($22) (block '(
  (let $23 (DataType 'Utf8))
  (let $24 (OptionalType $23))
  (let $25 '('Many 'Hashed 'Compact))
  (let $26 (SqueezeToDict (NarrowFlatMap (ToFlow $22) (lambda '($28 $29 $30) (IfPresent (SafeCast $29 $24) (lambda '($31) (block '(
    (let $32 (AsStruct '('"key" $28) '('"subkey" $29) '('"value" $30)))
    (return (Just '($31 $32)))
  ))) (Nothing (OptionalType (TupleType $23 $8)))))) (lambda '($33) (Nth $33 '0)) (lambda '($34) (Nth $34 '1)) $25))
  (let $27 (Bool 'true))
  (return (FromFlow (WideSort (FlatMap $26 (lambda '($35) (block '(
    (let $36 (YtReadTable! world $1 '((YtSection '((YtPath $6 '('"key") (Void) (Void))) '()))))
    (let $37 '('"key" '0 '"subkey" '1 '"value" '2))
    (return (MapJoinCore (WideMap (WideFilter (WideMap (DqReadWideWrap $36 '()) (lambda '($38) (SafeCast $38 $24))) (lambda '($39) (Exists $39))) (lambda '($40) (IfPresent $40 (lambda '($41) (block '(
      (let $42 '($23 '"" '1))
      (let $43 (CallableType '() '($23) $42))
      (let $44 (Udf '"Unicode.ToUpper" (Void) (VoidType) '"" $43 (VoidType) '"" '('('"blocks") '('"strict"))))
      (return (Just (Apply $44 $41)))
    ))) (Nothing $24)))) $35 'Inner '('0) '('"subkey") '() $37 '('"ia._equijoin_column_0") '('"ib.subkey")))
  )))) '('('0 $27) '('1 $27)))))
))) $13))
(let $15 (DqCnMerge (TDqOutput $14 '0) '('('0 '"Asc") '('1 '"Asc"))))
(let $16 (DqPhyStage '($15) (lambda '($45) (FromFlow (NarrowMap (ToFlow $45) (lambda '($46 $47 $48) (AsStruct '('"ib.key" $46) '('"ib.subkey" $47) '('"ib.value" $48)))))) '('('"_logical_id" '1917) '('"_id" '"96fee9d0-2f9725b2-904c2460-96de8983"))))
(let $17 '($10 $14 $16))
(let $18 '('"ib.key" '"ib.subkey" '"ib.value"))
(let $19 (DqCnResult (TDqOutput $16 '0) $18))
(return (KqpPhysicalQuery '((KqpPhysicalTx $17 '($19) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $12) '0 '0)) '('('"type" '"query"))))
)
