(
(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 '('"key" '"value"))
(let $10 (DataType 'Uint64))
(let $11 (OptionalType (DataType 'String)))
(let $12 '('"_wide_channels" (StructType '('"key" $10) '('"value" $11))))
(let $13 '('('"_logical_id" '2177) '('"_id" '"7b2ab24e-e8aeb05f-9ffd7a48-a7291ae0") $12))
(let $14 (DqPhyStage '() (lambda '() (block '(
  (let $46 '@@["StructType";[["key";["DataType";"Uint64"]];["value";["OptionalType";["DataType";"String"]]]]]@@)
  (let $47 (YqlRowSpec $2 $3 $4 '('Type $46)))
  (let $48 (YtStat '('Id '"Leaves") '('RecordsCount '"17") '('DataSize '"452") $6 $7 $8))
  (let $49 (YtTable '"Leaves" $47 $5 $48 '() (Void) (Void) '"/Root/plato"))
  (let $50 (YtReadTable! world $1 '((YtSection '((YtPath $49 $9 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $50 '())))
))) $13))
(let $15 (DqCnBroadcast (TDqOutput $14 '0)))
(let $16 (lambda '($53 $54) $53))
(let $17 (lambda '($55 $56) (AsStruct '('"key" $55) '('"value" $56))))
(let $18 '('Many 'Hashed 'Compact))
(let $19 '@@["StructType";[["key";["DataType";"Uint64"]];["leaf";["OptionalType";["DataType";"Uint64"]]];["branch";["OptionalType";["DataType";"Uint64"]]];["value";["OptionalType";["DataType";"String"]]]]]@@)
(let $20 (YqlRowSpec $2 $3 $4 '('Type $19)))
(let $21 (YtStat '('Id '"Roots") '('RecordsCount '"20") '('DataSize '"1002") $6 $7 $8))
(let $22 (YtTable '"Roots" $20 $5 $21 '() (Void) (Void) '"/Root/plato"))
(let $23 '('"key"))
(let $24 '('"value" '2))
(let $25 '('"i2.key"))
(let $26 (lambda '($64 $65 $66) $66 $64 $65))
(let $27 (StructType '('"Join" $11) '('"Key" $10) '('"Value" $11)))
(let $28 '('"_wide_channels" $27))
(let $29 '('('"_logical_id" '2461) '('"_id" '"5d44e9ba-9bd29f67-ef9e3f2b-541f1b97") $28))
(let $30 (DqPhyStage '($15) (lambda '($51) (block '(
  (let $52 (NarrowSqueezeToDict (ToFlow $51) $16 $17 $18))
  (return (FromFlow (WideMap (FlatMap $52 (lambda '($57) (block '(
    (let $58 '('"key" '"leaf" '"value"))
    (let $59 (YtReadTable! world $1 '((YtSection '((YtPath $22 $58 (Void) (Void))) '()))))
    (let $60 '('0 '0 '2 '1))
    (return (MapJoinCore (WideFilter (DqReadWideWrap $59 '()) (lambda '($61 $62 $63) (Exists $62))) $57 'Inner '('1) $23 $60 $24 '('"i1.leaf") $25))
  )))) $26)))
))) $29))
(let $31 '('('"_logical_id" '2229) '('"_id" '"2ac213ce-dcfe64f0-f70dbdbf-480bf13e") $12))
(let $32 (DqPhyStage '() (lambda '() (block '(
  (let $67 '@@["StructType";[["key";["DataType";"Uint64"]];["leaf";["OptionalType";["DataType";"Uint64"]]];["value";["OptionalType";["DataType";"String"]]]]]@@)
  (let $68 (YqlRowSpec $2 $3 $4 '('Type $67)))
  (let $69 (YtStat '('Id '"Branches") '('RecordsCount '"15") '('DataSize '"578") $6 $7 $8))
  (let $70 (YtTable '"Branches" $68 $5 $69 '() (Void) (Void) '"/Root/plato"))
  (let $71 (YtReadTable! world $1 '((YtSection '((YtPath $70 $9 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $71 '())))
))) $31))
(let $33 (DqCnBroadcast (TDqOutput $32 '0)))
(let $34 '('('"_logical_id" '2497) '('"_id" '"1dfbe459-c32b6e6a-eade6e19-9f2fdf3c") $28))
(let $35 (DqPhyStage '($33) (lambda '($72) (block '(
  (let $73 (NarrowSqueezeToDict (ToFlow $72) $16 $17 $18))
  (return (FromFlow (WideMap (FlatMap $73 (lambda '($74) (block '(
    (let $75 '('"branch" '"key" '"value"))
    (let $76 (YtReadTable! world $1 '((YtSection '((YtPath $22 $75 (Void) (Void))) '()))))
    (let $77 '('1 '0 '2 '1))
    (return (MapJoinCore (WideFilter (DqReadWideWrap $76 '()) (lambda '($78 $79 $80) (Exists $78))) $74 'Inner '('0) $23 $77 $24 '('"i1.branch") $25))
  )))) $26)))
))) $34))
(let $36 (DqCnParallelUnionAll (TDqOutput $30 '0)))
(let $37 (DqCnParallelUnionAll (TDqOutput $35 '0)))
(let $38 (lambda '($87 $88 $89) (AsStruct '('"Join" $87) '('"Key" $88) '('"Value" $89))))
(let $39 '('('"_logical_id" '2601) '('"_id" '"d62cdcd3-cbecd359-8fd4668b-16560915") $28))
(let $40 (DqPhyStage '($36 $37) (lambda '($81 $82) (block '(
  (let $83 (Bool 'true))
  (let $84 '($83 $83 $83))
  (let $85 (Sort (Extend (NarrowMap (ToFlow $81) $38) (NarrowMap (ToFlow $82) $38)) $84 (lambda '($90) '((Member $90 '"Key") (Member $90 '"Value") (Member $90 '"Join")))))
  (let $86 (lambda '($91) (Member $91 '"Join") (Member $91 '"Key") (Member $91 '"Value")))
  (return (FromFlow (ExpandMap $85 $86)))
))) $39))
(let $41 '('('1 '"Asc") '('2 '"Asc") '('0 '"Asc")))
(let $42 (DqCnMerge (TDqOutput $40 '0) $41))
(let $43 (DqPhyStage '($42) (lambda '($92) (FromFlow (NarrowMap (ToFlow $92) $38))) '('('"_logical_id" '2613) '('"_id" '"40f22649-2fadad55-708e01cc-8358022"))))
(let $44 '($14 $30 $32 $35 $40 $43))
(let $45 (DqCnResult (TDqOutput $43 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx $44 '($45) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $27) '0 '0)) '('('"type" '"query"))))
)
