(
(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 '"Input1") '('RecordsCount '"4") '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
(let $6 (YtTable '"Input1" $3 $4 $5 '() (Void) (Void) '"/Root/plato"))
(let $7 '('"key" '"subkey" '"value"))
(let $8 (YtReadTable! world $1 '((YtSection '((YtPath $6 $7 (Void) (Void))) '()))))
(let $9 (DqReadWideWrap $8 '()))
(let $10 (DataType 'Uint32))
(let $11 (OptionalType $10))
(let $12 '('"_logical_id" '1917))
(let $13 '('"key" $11))
(let $14 (DataType 'String))
(let $15 (StructType $13 '('"subkey" $14) '('"value" $14)))
(let $16 '($12 '('"_id" '"3ea02d3e-2f2727b7-247a9720-57b3db7f") '('"_wide_channels" $15)))
(let $17 (DqPhyStage '() (lambda '() (block '(
  (let $35 (lambda '($36 $37 $38) (SafeCast $36 $11) $37 $38))
  (return (FromFlow (WideMap $9 $35)))
))) $16))
(let $18 '('"key"))
(let $19 (StructType $13))
(let $20 '('"_wide_channels" $19))
(let $21 '('('"_logical_id" '1782) '('"_id" '"e8bbda31-38860494-771328be-6ce2d712") $20))
(let $22 (DqPhyStage '() (lambda '() (block '(
  (let $39 (YtReadTable! world $1 '((YtSection '((YtPath $6 $18 (Void) (Void))) '()))))
  (return (FromFlow (WideMap (DqReadWideWrap $39 '()) (lambda '($40) (% (SafeCast $40 $11) (Uint32 '"100"))))))
))) $21))
(let $23 '($12 '('"_id" '"3fcf8cae-9467bbc4-44805031-fed46dac") $20))
(let $24 (DqPhyStage '() (lambda '() (FromFlow (WideMap $9 (lambda '($41 $42 $43) (SafeCast $41 $11))))) $23))
(let $25 (DqCnMap (TDqOutput $17 '0)))
(let $26 (DqCnBroadcast (TDqOutput $22 '0)))
(let $27 (DqCnBroadcast (TDqOutput $24 '0)))
(let $28 '($25 $26 $27))
(let $29 (DqPhyStage $28 (lambda '($44 $45 $46) (block '(
  (let $47 (lambda '($50) (Exists $50)))
  (let $48 '('Many 'Hashed 'Compact))
  (let $49 (SqueezeToDict (NarrowFlatMap (WideFilter (ToFlow $46) $47) (lambda '($51) (IfPresent $51 (lambda '($52) (Just '($52 (AsStruct '('"key" $51))))) (Nothing (OptionalType (TupleType $10 $19)))))) (lambda '($53) (Nth $53 '0)) (lambda '($54) (Nth $54 '1)) $48))
  (return (FromFlow (NarrowMap (FlatMap $49 (lambda '($55) (block '(
    (let $56 '('One 'Hashed 'Compact))
    (let $57 (SqueezeToDict (NarrowFlatMap (WideFilter (ToFlow $45) $47) (lambda '($61) $61)) (lambda '($62) $62) (lambda '($63) (Void)) $56))
    (let $58 '('0))
    (let $59 '('0 '0 '1 '1 '2 '2))
    (let $60 '('"i1.key"))
    (return (MapJoinCore (WideFilter (FlatMap $57 (lambda '($64) (MapJoinCore (ToFlow $44) $64 'LeftOnly $58 $18 $59 '() $60 '('"i2.key")))) (lambda '($65 $66 $67) (Exists $65))) $55 'Inner $58 $18 $59 '() $60 '('"i3.key")))
  )))) (lambda '($68 $69 $70) (AsStruct '('"i1.key" $68) '('"i1.subkey" $69) '('"i1.value" $70))))))
))) '('('"_logical_id" '2026) '('"_id" '"185d3807-ebe36d7b-1d2f126-82ff66c7"))))
(let $30 (DqCnUnionAll (TDqOutput $29 '0)))
(let $31 (DqPhyStage '($30) (lambda '($71) $71) '('('"_logical_id" '2389) '('"_id" '"187a2043-ed34af27-ffa68c08-a4272bf3"))))
(let $32 '($17 $22 $24 $29 $31))
(let $33 '('"i1.key" '"i1.subkey" '"i1.value"))
(let $34 (DqCnResult (TDqOutput $31 '0) $33))
(return (KqpPhysicalQuery '((KqpPhysicalTx $32 '($34) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType '('"i1.key" $11) '('"i1.subkey" $14) '('"i1.value" $14))) '0 '0)) '('('"type" '"query"))))
)
