(
(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" '1460) '('"_id" '"970616ed-d53d89a8-6a85daa2-77d7db5b") $12))
(let $14 (DqPhyStage '() (lambda '() (block '(
  (let $36 '@@["StructType";[["key";["DataType";"Uint64"]];["value";["OptionalType";["DataType";"String"]]]]]@@)
  (let $37 (YqlRowSpec $2 $3 $4 '('Type $36)))
  (let $38 (YtStat '('Id '"Leaves") '('RecordsCount '"17") '('DataSize '"452") $6 $7 $8))
  (let $39 (YtTable '"Leaves" $37 $5 $38 '() (Void) (Void) '"/Root/plato"))
  (let $40 (YtReadTable! world $1 '((YtSection '((YtPath $39 $9 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $40 '())))
))) $13))
(let $15 (DqCnBroadcast (TDqOutput $14 '0)))
(let $16 (lambda '($43 $44) $43))
(let $17 (lambda '($45 $46) (AsStruct '('"key" $45) '('"value" $46))))
(let $18 '('Many 'Hashed 'Compact))
(let $19 '('"key"))
(let $20 (OptionalType $10))
(let $21 (StructType '('"i1.branch" $20) '('"i1.key" $10) '('"i1.leaf" $20) '('"i1.value" $11) '('"i2.key" $10) '('"i2.value" $11)))
(let $22 '('('"_logical_id" '1556) '('"_id" '"11fbf19c-f4c8ef7f-6cf8b33a-55c49b2e") '('"_wide_channels" $21)))
(let $23 (DqPhyStage '($15) (lambda '($41) (block '(
  (let $42 (NarrowSqueezeToDict (ToFlow $41) $16 $17 $18))
  (return (FromFlow (FlatMap $42 (lambda '($47) (block '(
    (let $48 '@@["StructType";[["key";["DataType";"Uint64"]];["leaf";["OptionalType";["DataType";"Uint64"]]];["branch";["OptionalType";["DataType";"Uint64"]]];["value";["OptionalType";["DataType";"String"]]]]]@@)
    (let $49 (YqlRowSpec $2 $3 $4 '('Type $48)))
    (let $50 (YtStat '('Id '"Roots") '('RecordsCount '"20") '('DataSize '"1002") $6 $7 $8))
    (let $51 (YtTable '"Roots" $49 $5 $50 '() (Void) (Void) '"/Root/plato"))
    (let $52 '('"branch" '"key" '"leaf" '"value"))
    (let $53 (YtReadTable! world $1 '((YtSection '((YtPath $51 $52 (Void) (Void))) '()))))
    (let $54 '('0 '0 '1 '1 '2 '2 '3 '3))
    (let $55 '('"key" '4 '"value" '5))
    (return (MapJoinCore (WideFilter (DqReadWideWrap $53 '()) (lambda '($56 $57 $58 $59) (Exists $58))) $47 'Inner '('2) $19 $54 $55 '('"i1.leaf") '('"i2.key")))
  ))))))
))) $22))
(let $24 '('('"_logical_id" '1484) '('"_id" '"3c8a4f51-4fa8f00c-785ce45c-deb3d838") $12))
(let $25 (DqPhyStage '() (lambda '() (block '(
  (let $60 '@@["StructType";[["key";["DataType";"Uint64"]];["leaf";["OptionalType";["DataType";"Uint64"]]];["value";["OptionalType";["DataType";"String"]]]]]@@)
  (let $61 (YqlRowSpec $2 $3 $4 '('Type $60)))
  (let $62 (YtStat '('Id '"Branches") '('RecordsCount '"15") '('DataSize '"578") $6 $7 $8))
  (let $63 (YtTable '"Branches" $61 $5 $62 '() (Void) (Void) '"/Root/plato"))
  (let $64 (YtReadTable! world $1 '((YtSection '((YtPath $63 $9 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $64 '())))
))) $24))
(let $26 (DqCnMap (TDqOutput $23 '0)))
(let $27 (DqCnBroadcast (TDqOutput $25 '0)))
(let $28 (StructType '('"Branch" $11) '('"Key" $10) '('"Leaf" $11) '('"Value" $11)))
(let $29 '('('"_logical_id" '1751) '('"_id" '"dffde21-b393c74a-5a11e6f3-24cea303") '('"_wide_channels" $28)))
(let $30 (DqPhyStage '($26 $27) (lambda '($65 $66) (block '(
  (let $67 (NarrowSqueezeToDict (ToFlow $66) $16 $17 $18))
  (let $68 (Bool 'true))
  (let $69 (lambda '($83 $84 $85 $86) $86 $83 $85 $84))
  (return (FromFlow (WideMap (WideSort (FlatMap $67 (lambda '($70) (block '(
    (let $71 (lambda '($73 $74 $75 $76 $77 $78) $73 $74 $76 $78))
    (let $72 '('1 '0 '2 '1 '3 '2))
    (return (MapJoinCore (WideFilter (WideMap (ToFlow $65) $71) (lambda '($79 $80 $81 $82) (Exists $79))) $70 'Inner '('0) $19 $72 '('"value" '3) '('"i1.branch") '('"i3.key")))
  )))) '('('2 $68) '('3 $68))) $69)))
))) $29))
(let $31 (DqCnMerge (TDqOutput $30 '0) '('('2 '"Asc") '('0 '"Asc"))))
(let $32 (DqPhyStage '($31) (lambda '($87) (FromFlow (NarrowMap (ToFlow $87) (lambda '($88 $89 $90 $91) (AsStruct '('"Branch" $88) '('"Key" $89) '('"Leaf" $90) '('"Value" $91)))))) '('('"_logical_id" '1763) '('"_id" '"895ecaaa-38378eec-e2764acd-33bc181e"))))
(let $33 '($14 $23 $25 $30 $32))
(let $34 '('"Key" '"Value" '"Leaf" '"Branch"))
(let $35 (DqCnResult (TDqOutput $32 '0) $34))
(return (KqpPhysicalQuery '((KqpPhysicalTx $33 '($35) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $28) '0 '0)) '('('"type" '"query"))))
)
