(
(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 $50 '@@["StructType";[["key";["DataType";"Uint64"]];["value";["OptionalType";["DataType";"String"]]]]]@@)
  (let $51 (YqlRowSpec $2 $3 $4 '('Type $50)))
  (let $52 (YtStat '('Id '"Leaves") '('RecordsCount '"17") '('DataSize '"452") $6 $7 $8))
  (let $53 (YtTable '"Leaves" $51 $5 $52 '() (Void) (Void) '"/Root/plato"))
  (let $54 (YtReadTable! world $1 '((YtSection '((YtPath $53 '('"key" '"value") (Void) (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $54 '())))
))))
(let $10 '('"_logical_id" '2311))
(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" '"9059b6bc-49ca4071-a7f22581-3267c894") $15))
(let $17 (DqPhyStage '() $9 $16))
(let $18 (DqCnBroadcast (TDqOutput $17 '0)))
(let $19 (lambda '($57 $58) $57))
(let $20 (lambda '($59 $60) (AsStruct '('"key" $59) '('"value" $60))))
(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" '2371) '('"_id" '"dfd1618e-7aed7bb6-26b7931a-a339a662") '('"_wide_channels" $24)))
(let $26 (DqPhyStage '($18) (lambda '($55) (block '(
  (let $56 (NarrowSqueezeToDict (ToFlow $55) $19 $20 $21))
  (return (FromFlow (FlatMap $56 (lambda '($61) (block '(
    (let $62 '@@["StructType";[["key";["DataType";"Uint64"]];["leaf";["OptionalType";["DataType";"Uint64"]]];["branch";["OptionalType";["DataType";"Uint64"]]];["value";["OptionalType";["DataType";"String"]]]]]@@)
    (let $63 (YqlRowSpec $2 $3 $4 '('Type $62)))
    (let $64 (YtStat '('Id '"Roots") '('RecordsCount '"20") '('DataSize '"1002") $6 $7 $8))
    (let $65 (YtTable '"Roots" $63 $5 $64 '() (Void) (Void) '"/Root/plato"))
    (let $66 '('"branch" '"key" '"leaf" '"value"))
    (let $67 (YtReadTable! world $1 '((YtSection '((YtPath $65 $66 (Void) (Void) (Void))) '()))))
    (let $68 '('0 '0 '1 '1 '2 '2 '3 '3))
    (let $69 '('"key" '4 '"value" '5))
    (return (MapJoinCore (WideFilter (DqReadWideWrap $67 '()) (lambda '($70 $71 $72 $73) (Exists $72))) $61 'Inner '('2) $22 $68 $69 '('"i1.leaf") '('"i2.key")))
  ))))))
))) $25))
(let $27 (StructType $12 '('"leaf" $23) $14))
(let $28 '('('"_logical_id" '1886) '('"_id" '"f5695d0d-79f8a671-d1e15ec5-f0778d25") '('"_wide_channels" $27)))
(let $29 (DqPhyStage '() (lambda '() (block '(
  (let $74 '@@["StructType";[["key";["DataType";"Uint64"]];["leaf";["OptionalType";["DataType";"Uint64"]]];["value";["OptionalType";["DataType";"String"]]]]]@@)
  (let $75 (YqlRowSpec $2 $3 $4 '('Type $74)))
  (let $76 (YtStat '('Id '"Branches") '('RecordsCount '"15") '('DataSize '"578") $6 $7 $8))
  (let $77 (YtTable '"Branches" $75 $5 $76 '() (Void) (Void) '"/Root/plato"))
  (let $78 '('"key" '"leaf" '"value"))
  (let $79 (YtReadTable! world $1 '((YtSection '((YtPath $77 $78 (Void) (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $79 '())))
))) $28))
(let $30 '($10 '('"_id" '"c57ed6e9-fb441886-1361dd1a-603b1af5") $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 (StructType '('"Branch" $13) '('"Branch_Leaf" $13) '('"Key" $11) '('"Leaf" $13) '('"Value" $13)))
(let $37 '('"_wide_channels" $36))
(let $38 '('('"_logical_id" '2613) '('"_id" '"7dab4670-2f03f293-7777222e-9370d675") $37))
(let $39 (DqPhyStage $35 (lambda '($80 $81 $82) (block '(
  (let $83 (NarrowSqueezeToDict (ToFlow $82) $19 $20 $21))
  (let $84 (lambda '($116 $117 $118 $119 $120) $119 $120 $116 $118 $117))
  (let $85 (lambda '($121 $122 $123 $124 $125 $126 $127 $128 $129 $130) $121 $122 $123 $124 $125))
  (let $86 (lambda '($131 $132 $133 $134 $135 $136 $137 $138 $139 $140 $141 $142 $143 $144 $145) $141 $142 $143 $144 $145))
  (let $87 (lambda '($146 $147 $148 $149 $150 $151 $152 $153 $154 $155) $151 $152 $153 $154 $155))
  (return (DqPhyHashCombine (FromFlow (FlatMap $83 (lambda '($88) (block '(
    (let $89 (NarrowSqueezeToDict (ToFlow $81) (lambda '($91 $92 $93) $91) (lambda '($94 $95 $96) (AsStruct '('"key" $94) '('"leaf" $95) '('"value" $96))) $21))
    (let $90 '('0 '0 '1 '1 '2 '2 '4 '3))
    (return (MapJoinCore (WideFilter (FlatMap $89 (lambda '($97) (block '(
      (let $98 (lambda '($101 $102 $103 $104 $105 $106) $101 $102 $104 $106))
      (let $99 '('1 '0 '2 '1 '3 '2))
      (let $100 '('"leaf" '3 '"value" '4))
      (return (MapJoinCore (WideFilter (WideMap (ToFlow $80) $98) (lambda '($107 $108 $109 $110) (Exists $107))) $97 'Inner '('0) $22 $99 $100 '('"i1.branch") '('"i3.key")))
    )))) (lambda '($111 $112 $113 $114 $115) (Exists $114))) $88 'Inner '('3) $22 $90 '('"value" '4) '('"i3.leaf") '('"i4.key")))
  ))))) '-1073741824 $84 $85 $86 $87))
))) $38))
(let $40 '('0 '1 '2 '3 '4))
(let $41 (DqCnHashShuffle (TDqOutput $39 '0) $40 '0 '"HashV2"))
(let $42 '('('"_logical_id" '2755) '('"_id" '"a66a4499-6af4835-cd519345-854ad330") $37))
(let $43 (DqPhyStage '($41) (lambda '($156) (block '(
  (let $157 (lambda '($162 $163 $164 $165 $166) $162 $163 $164 $165 $166))
  (let $158 (lambda '($167 $168 $169 $170 $171 $172 $173 $174 $175 $176)))
  (let $159 (WideCombiner (ToFlow $156) '"" $157 $158 $158 $157))
  (let $160 (Bool 'true))
  (let $161 '('('3 $160) '('0 $160) '('1 $160)))
  (return (FromFlow (WideSort $159 $161)))
))) $42))
(let $44 '('('3 '"Asc") '('0 '"Asc") '('1 '"Asc")))
(let $45 (DqCnMerge (TDqOutput $43 '0) $44))
(let $46 (DqPhyStage '($45) (lambda '($177) (FromFlow (NarrowMap (ToFlow $177) (lambda '($178 $179 $180 $181 $182) (AsStruct '('"Branch" $178) '('"Branch_Leaf" $179) '('"Key" $180) '('"Leaf" $181) '('"Value" $182)))))) '('('"_logical_id" '2767) '('"_id" '"c8cb6538-8abb4876-4ac1ed53-7be460fc"))))
(let $47 '($17 $26 $29 $31 $39 $43 $46))
(let $48 '('"Key" '"Value" '"Leaf" '"Branch" '"Branch_Leaf"))
(let $49 (DqCnResult (TDqOutput $46 '0) $48))
(return (KqpPhysicalQuery '((KqpPhysicalTx $47 '($49) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $36) '0 '0)) '('('"type" '"query"))))
)
