(
(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 '('RecordsCount '4))
(let $6 '('DataSize '"166"))
(let $7 '('ChunkCount '1))
(let $8 '('ModifyTime '0))
(let $9 '('Revision '0))
(let $10 '('"key" '"subkey" '"value"))
(let $11 (DataType 'String))
(let $12 '('"subkey" $11))
(let $13 (StructType '('"key" $11) $12 '('"value" $11)))
(let $14 '('('"_logical_id" '1486) '('"_id" '"394fae5-256baf67-bfa6518c-773772d5") '('"_wide_channels" $13)))
(let $15 (DqPhyStage '() (lambda '() (block '(
  (let $40 (YtStat '('Id '"B") $5 $6 $7 $8 $9))
  (let $41 (YtTable '"B" $3 $4 $40 '() (Void) (Void) '"/Root/plato"))
  (let $42 (YtReadTable! world $1 '((YtSection '((YtPath $41 $10 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $42 '())))
))) $14))
(let $16 (DqCnBroadcast (TDqOutput $15 '0)))
(let $17 '('Many 'Hashed 'Compact))
(let $18 '('"A.key" $11))
(let $19 '('"A.subkey" $11))
(let $20 '('"A.value" $11))
(let $21 '('"B.key" $11))
(let $22 '('"B.subkey" $11))
(let $23 '('"B.value" $11))
(let $24 (StructType $18 $19 $20 $21 $22 $23))
(let $25 '('('"_logical_id" '1576) '('"_id" '"64cfac32-b3102585-6c527439-d7aa278b") '('"_wide_channels" $24)))
(let $26 (DqPhyStage '($16) (lambda '($43) (block '(
  (let $44 (NarrowSqueezeToDict (ToFlow $43) (lambda '($45 $46 $47) $45) (lambda '($48 $49 $50) (AsStruct '('"key" $48) '('"subkey" $49) '('"value" $50))) $17))
  (return (FromFlow (FlatMap $44 (lambda '($51) (block '(
    (let $52 (YtStat '('Id '"A") $5 $6 $7 $8 $9))
    (let $53 (YtTable '"A" $3 $4 $52 '() (Void) (Void) '"/Root/plato"))
    (let $54 (YtReadTable! world $1 '((YtSection '((YtPath $53 $10 (Void) (Void))) '()))))
    (let $55 '('0 '0 '1 '1 '2 '2))
    (let $56 '('"key" '3 '"subkey" '4 '"value" '5))
    (return (MapJoinCore (DqReadWideWrap $54 '()) $51 'Inner '('0) '('"key") $55 $56 '('"A.key") '('"B.key")))
  ))))))
))) $25))
(let $27 '('"subkey"))
(let $28 '('('"_logical_id" '1507) '('"_id" '"70375e-6e8a5b46-843a607c-870f161d") '('"_wide_channels" (StructType $12))))
(let $29 (DqPhyStage '() (lambda '() (block '(
  (let $57 (YtStat '('Id '"C") $5 $6 $7 $8 $9))
  (let $58 (YtTable '"C" $3 $4 $57 '() (Void) (Void) '"/Root/plato"))
  (let $59 (YtReadTable! world $1 '((YtSection '((YtPath $58 $27 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $59 '())))
))) $28))
(let $30 (DqCnMap (TDqOutput $26 '0)))
(let $31 (DqCnBroadcast (TDqOutput $29 '0)))
(let $32 (StructType $18 $19 $20 $21 $22 $23 '('"goal" $11)))
(let $33 '('('"_logical_id" '1728) '('"_id" '"9df500d8-73203326-ea51d816-ee084f7d") '('"_wide_channels" $32)))
(let $34 (DqPhyStage '($30 $31) (lambda '($60 $61) (block '(
  (let $62 (NarrowSqueezeToDict (ToFlow $61) (lambda '($63) $63) (lambda '($64) (AsStruct '('"subkey" $64))) $17))
  (return (FromFlow (WideSort (FlatMap $62 (lambda '($65) (block '(
    (let $66 '('0 '0 '1 '1 '2 '2 '3 '3 '4 '4 '5 '5))
    (return (MapJoinCore (ToFlow $60) $65 'Inner '('4) $27 $66 '('"subkey" '6) '('"B.subkey") '('"C.subkey")))
  )))) '('('0 (Bool 'true))))))
))) $33))
(let $35 (DqCnMerge (TDqOutput $34 '0) '('('0 '"Asc"))))
(let $36 (DqPhyStage '($35) (lambda '($67) (FromFlow (NarrowMap (ToFlow $67) (lambda '($68 $69 $70 $71 $72 $73 $74) (AsStruct '('"A.key" $68) '('"A.subkey" $69) '('"A.value" $70) '('"B.key" $71) '('"B.subkey" $72) '('"B.value" $73) '('"goal" $74)))))) '('('"_logical_id" '1740) '('"_id" '"3866671c-36448db6-33b6ede7-4dc4ef91"))))
(let $37 '($15 $26 $29 $34 $36))
(let $38 '('"A.key" '"A.subkey" '"A.value" '"goal" '"B.key" '"B.subkey" '"B.value"))
(let $39 (DqCnResult (TDqOutput $36 '0) $38))
(return (KqpPhysicalQuery '((KqpPhysicalTx $37 '($39) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $32) '0 '0)) '('('"type" '"query"))))
)
