(
(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 $42 '@@["StructType";[["key";["DataType";"Uint64"]];["value";["OptionalType";["DataType";"String"]]]]]@@)
  (let $43 (YqlRowSpec $2 $3 $4 '('Type $42)))
  (let $44 (YtStat '('Id '"Leaves") '('RecordsCount '"17") '('DataSize '"452") $6 $7 $8))
  (let $45 (YtTable '"Leaves" $43 $5 $44 '() (Void) (Void) '"/Root/plato"))
  (let $46 (YtReadTable! world $1 '((YtSection '((YtPath $45 '('"key" '"value") (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $46 '())))
))))
(let $10 '('"_logical_id" '1823))
(let $11 (DataType 'Uint64))
(let $12 '('"key" $11))
(let $13 (OptionalType (DataType 'String)))
(let $14 '('"value" $13))
(let $15 '('"_wide_channels" (StructType $12 $14)))
(let $16 '($10 '('"_id" '"898563c2-5db18f89-d1d3ae9-8c24983c") $15))
(let $17 (DqPhyStage '() $9 $16))
(let $18 (DqCnBroadcast (TDqOutput $17 '0)))
(let $19 (lambda '($49 $50) $49))
(let $20 (lambda '($51 $52) (AsStruct '('"key" $51) '('"value" $52))))
(let $21 '('Many 'Hashed 'Compact))
(let $22 '('"key"))
(let $23 (OptionalType $11))
(let $24 (StructType '('"i1.branch" $23) '('"i1.key" $11) '('"i1.leaf" $23) '('"i1.value" $13) '('"i2.key" $11) '('"i2.value" $13)))
(let $25 '('('"_logical_id" '1879) '('"_id" '"3fa38675-3cc26a4c-5a634b3e-c5359239") '('"_wide_channels" $24)))
(let $26 (DqPhyStage '($18) (lambda '($47) (block '(
  (let $48 (NarrowSqueezeToDict (ToFlow $47) $19 $20 $21))
  (return (FromFlow (FlatMap $48 (lambda '($53) (block '(
    (let $54 '@@["StructType";[["key";["DataType";"Uint64"]];["leaf";["OptionalType";["DataType";"Uint64"]]];["branch";["OptionalType";["DataType";"Uint64"]]];["value";["OptionalType";["DataType";"String"]]]]]@@)
    (let $55 (YqlRowSpec $2 $3 $4 '('Type $54)))
    (let $56 (YtStat '('Id '"Roots") '('RecordsCount '"20") '('DataSize '"1002") $6 $7 $8))
    (let $57 (YtTable '"Roots" $55 $5 $56 '() (Void) (Void) '"/Root/plato"))
    (let $58 '('"branch" '"key" '"leaf" '"value"))
    (let $59 (YtReadTable! world $1 '((YtSection '((YtPath $57 $58 (Void) (Void))) '()))))
    (let $60 '('0 '0 '1 '1 '2 '2 '3 '3))
    (let $61 '('"key" '4 '"value" '5))
    (return (MapJoinCore (WideFilter (DqReadWideWrap $59 '()) (lambda '($62 $63 $64 $65) (Exists $64))) $53 'Inner '('2) $22 $60 $61 '('"i1.leaf") '('"i2.key")))
  ))))))
))) $25))
(let $27 (StructType $12 '('"leaf" $23) $14))
(let $28 '('('"_logical_id" '1760) '('"_id" '"f2cd2d54-2ea30e79-ebd1991f-34f9e9f8") '('"_wide_channels" $27)))
(let $29 (DqPhyStage '() (lambda '() (block '(
  (let $66 '@@["StructType";[["key";["DataType";"Uint64"]];["leaf";["OptionalType";["DataType";"Uint64"]]];["value";["OptionalType";["DataType";"String"]]]]]@@)
  (let $67 (YqlRowSpec $2 $3 $4 '('Type $66)))
  (let $68 (YtStat '('Id '"Branches") '('RecordsCount '"15") '('DataSize '"578") $6 $7 $8))
  (let $69 (YtTable '"Branches" $67 $5 $68 '() (Void) (Void) '"/Root/plato"))
  (let $70 '('"key" '"leaf" '"value"))
  (let $71 (YtReadTable! world $1 '((YtSection '((YtPath $69 $70 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $71 '())))
))) $28))
(let $30 '($10 '('"_id" '"467afd65-a88e3eb7-65839d09-1cecce87") $15))
(let $31 (DqPhyStage '() $9 $30))
(let $32 (DqCnMap (TDqOutput $26 '0)))
(let $33 (DqCnBroadcast (TDqOutput $29 '0)))
(let $34 (DqCnBroadcast (TDqOutput $31 '0)))
(let $35 '($32 $33 $34))
(let $36 (DqPhyStage $35 (lambda '($72 $73 $74) (block '(
  (let $75 (NarrowSqueezeToDict (ToFlow $74) $19 $20 $21))
  (return (FromFlow (NarrowMap (FlatMap $75 (lambda '($76) (block '(
    (let $77 (NarrowSqueezeToDict (ToFlow $73) (lambda '($79 $80 $81) $79) (lambda '($82 $83 $84) (AsStruct '('"key" $82) '('"leaf" $83) '('"value" $84))) $21))
    (let $78 '('0 '0 '1 '1 '2 '2 '4 '3))
    (return (MapJoinCore (WideFilter (FlatMap $77 (lambda '($85) (block '(
      (let $86 (lambda '($89 $90 $91 $92 $93 $94) $89 $90 $92 $94))
      (let $87 '('1 '0 '2 '1 '3 '2))
      (let $88 '('"leaf" '3 '"value" '4))
      (return (MapJoinCore (WideFilter (WideMap (ToFlow $72) $86) (lambda '($95 $96 $97 $98) (Exists $95))) $85 'Inner '('0) $22 $87 $88 '('"i1.branch") '('"i3.key")))
    )))) (lambda '($99 $100 $101 $102 $103) (Exists $102))) $76 'Inner '('3) $22 $78 '('"value" '4) '('"i3.leaf") '('"i4.key")))
  )))) (lambda '($104 $105 $106 $107 $108) (AsStruct '('"Branch" $107) '('"Branch_Leaf" $108) '('"Key" $104) '('"Leaf" $106) '('"Value" $105))))))
))) '('('"_logical_id" '2079) '('"_id" '"6814d667-64a2e877-b5495d8f-45e37de5"))))
(let $37 (DqCnUnionAll (TDqOutput $36 '0)))
(let $38 (DqPhyStage '($37) (lambda '($109) $109) '('('"_logical_id" '2644) '('"_id" '"1f94be8e-c6aff498-4ddf0813-9093ee7"))))
(let $39 '($17 $26 $29 $31 $36 $38))
(let $40 '('"Key" '"Value" '"Leaf" '"Branch" '"Branch_Leaf"))
(let $41 (DqCnResult (TDqOutput $38 '0) $40))
(return (KqpPhysicalQuery '((KqpPhysicalTx $39 '($41) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType '('"Branch" $13) '('"Branch_Leaf" $13) '('"Key" $11) '('"Leaf" $13) '('"Value" $13))) '0 '0)) '('('"type" '"query"))))
)
