(
(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" '2294) '('"_id" '"c38954ed-b5cc93ab-1e9a2fc2-84f2ecc") $12))
(let $14 (DqPhyStage '() (lambda '() (block '(
  (let $58 '@@["StructType";[["key";["DataType";"Uint64"]];["value";["OptionalType";["DataType";"String"]]]]]@@)
  (let $59 (YqlRowSpec $2 $3 $4 '('Type $58)))
  (let $60 (YtStat '('Id '"Leaves") '('RecordsCount '"17") '('DataSize '"452") $6 $7 $8))
  (let $61 (YtTable '"Leaves" $59 $5 $60 '() (Void) (Void) '"/Root/plato"))
  (let $62 (YtReadTable! world $1 '((YtSection '((YtPath $61 $9 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $62 '())))
))) $13))
(let $15 (DqCnBroadcast (TDqOutput $14 '0)))
(let $16 (lambda '($65 $66) $65))
(let $17 (lambda '($67 $68) (AsStruct '('"key" $67) '('"value" $68))))
(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 '($76 $77 $78) $78 $76 $77))
(let $27 (lambda '($79 $80 $81 $82 $83 $84) $79 $80 $81))
(let $28 (lambda '($85 $86 $87 $88 $89 $90 $91 $92 $93) $91 $92 $93))
(let $29 (lambda '($94 $95 $96 $97 $98 $99) $97 $98 $99))
(let $30 (StructType '('"Join" $11) '('"Key" $10) '('"Value" $11)))
(let $31 '('"_wide_channels" $30))
(let $32 '('('"_logical_id" '2696) '('"_id" '"65d63492-c990c97e-6abd503-76568659") $31))
(let $33 (DqPhyStage '($15) (lambda '($63) (block '(
  (let $64 (NarrowSqueezeToDict (ToFlow $63) $16 $17 $18))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (FlatMap $64 (lambda '($69) (block '(
    (let $70 '('"key" '"leaf" '"value"))
    (let $71 (YtReadTable! world $1 '((YtSection '((YtPath $22 $70 (Void) (Void))) '()))))
    (let $72 '('0 '0 '2 '1))
    (return (MapJoinCore (WideFilter (DqReadWideWrap $71 '()) (lambda '($73 $74 $75) (Exists $74))) $69 'Inner '('1) $23 $72 $24 '('"i1.leaf") $25))
  )))))) '-1073741824 $26 $27 $28 $29))
))) $32))
(let $34 '('0 '1 '2))
(let $35 (DqCnHashShuffle (TDqOutput $33 '0) $34 '0 '"HashV2"))
(let $36 (lambda '($100) (block '(
  (let $101 (lambda '($103 $104 $105) $103 $104 $105))
  (let $102 (lambda '($106 $107 $108 $109 $110 $111)))
  (return (FromFlow (WideCombiner (ToFlow (WideFromBlocks $100)) '"" $101 $102 $102 $101)))
))))
(let $37 '('"_partition_mode" '"aggregate"))
(let $38 '('('"_logical_id" '3398) '('"_id" '"2f7d0837-1066d01a-25ae8d5b-351280f") $37 $31))
(let $39 (DqPhyStage '($35) $36 $38))
(let $40 '('('"_logical_id" '2348) '('"_id" '"9ee95c20-716b5d20-a55f2be5-4e5e99a5") $12))
(let $41 (DqPhyStage '() (lambda '() (block '(
  (let $112 '@@["StructType";[["key";["DataType";"Uint64"]];["leaf";["OptionalType";["DataType";"Uint64"]]];["value";["OptionalType";["DataType";"String"]]]]]@@)
  (let $113 (YqlRowSpec $2 $3 $4 '('Type $112)))
  (let $114 (YtStat '('Id '"Branches") '('RecordsCount '"15") '('DataSize '"578") $6 $7 $8))
  (let $115 (YtTable '"Branches" $113 $5 $114 '() (Void) (Void) '"/Root/plato"))
  (let $116 (YtReadTable! world $1 '((YtSection '((YtPath $115 $9 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $116 '())))
))) $40))
(let $42 (DqCnBroadcast (TDqOutput $41 '0)))
(let $43 '('('"_logical_id" '2724) '('"_id" '"f95609fb-791bc9fb-50177300-28f9b2da") $31))
(let $44 (DqPhyStage '($42) (lambda '($117) (block '(
  (let $118 (NarrowSqueezeToDict (ToFlow $117) $16 $17 $18))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (FlatMap $118 (lambda '($119) (block '(
    (let $120 '('"branch" '"key" '"value"))
    (let $121 (YtReadTable! world $1 '((YtSection '((YtPath $22 $120 (Void) (Void))) '()))))
    (let $122 '('1 '0 '2 '1))
    (return (MapJoinCore (WideFilter (DqReadWideWrap $121 '()) (lambda '($123 $124 $125) (Exists $123))) $119 'Inner '('0) $23 $122 $24 '('"i1.branch") $25))
  )))))) '-1073741824 $26 $27 $28 $29))
))) $43))
(let $45 (DqCnHashShuffle (TDqOutput $44 '0) $34 '0 '"HashV2"))
(let $46 '('('"_logical_id" '3427) '('"_id" '"2e38b415-6b9cfbad-1f40ca0c-4debed17") $37 $31))
(let $47 (DqPhyStage '($45) $36 $46))
(let $48 (DqCnParallelUnionAll (TDqOutput $39 '0)))
(let $49 (DqCnParallelUnionAll (TDqOutput $47 '0)))
(let $50 (lambda '($132 $133 $134) (AsStruct '('"Join" $132) '('"Key" $133) '('"Value" $134))))
(let $51 '('('"_logical_id" '3512) '('"_id" '"35f0bd94-6fd6848c-b02d5ac2-faa6358f") $31))
(let $52 (DqPhyStage '($48 $49) (lambda '($126 $127) (block '(
  (let $128 (Bool 'true))
  (let $129 '($128 $128 $128))
  (let $130 (Sort (Extend (NarrowMap (ToFlow $126) $50) (NarrowMap (ToFlow $127) $50)) $129 (lambda '($135) '((Member $135 '"Key") (Member $135 '"Value") (Member $135 '"Join")))))
  (let $131 (lambda '($136) (Member $136 '"Join") (Member $136 '"Key") (Member $136 '"Value")))
  (return (FromFlow (ExpandMap $130 $131)))
))) $51))
(let $53 '('('1 '"Asc") '('2 '"Asc") '('0 '"Asc")))
(let $54 (DqCnMerge (TDqOutput $52 '0) $53))
(let $55 (DqPhyStage '($54) (lambda '($137) (FromFlow (NarrowMap (ToFlow $137) $50))) '('('"_logical_id" '3524) '('"_id" '"5c005343-3630ea9e-ce9ab082-76244d56"))))
(let $56 '($14 $33 $39 $41 $44 $47 $52 $55))
(let $57 (DqCnResult (TDqOutput $55 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx $56 '($57) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $30) '0 '0)) '('('"type" '"query"))))
)
