(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '('NativeYtTypeFlags '0))
(let $3 '('StrictSchema '1))
(let $4 '('UniqueKeys '1))
(let $5 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
(let $6 '('Type $5))
(let $7 (Bool 'true))
(let $8 '('"key"))
(let $9 (DataType 'String))
(let $10 (YqlRowSpec $2 $3 $4 $6 '('SortDirections '($7)) '('SortMembers $8) '('SortedBy $8) '('SortedByTypes '($9))))
(let $11 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
(let $12 '('ChunkCount '1))
(let $13 '('ModifyTime '0))
(let $14 '('Revision '0))
(let $15 (YtStat '('Id '"SortedByKey") '('RecordsCount '"8") '('DataSize '"336") $12 $13 $14))
(let $16 (YtTable '"SortedByKey" $10 $11 $15 '() (Void) (Void) '"/Root/plato"))
(let $17 '('"key" '"subkey" '"value"))
(let $18 (YtReadTable! world $1 '((YtSection '((YtPath $16 $17 (Void) (Void) (Void))) '()))))
(let $19 (DqReadWideWrap $18 '()))
(let $20 '('"key" $9))
(let $21 (StructType $20 '('"subkey" $9) '('"value" $9)))
(let $22 '('"_wide_channels" $21))
(let $23 '('('"_logical_id" '4633) '('"_id" '"3f0c4674-f98eb9a2-90327ba4-123c2441") $22))
(let $24 (DqPhyStage '() (lambda '() (FromFlow $19)) $23))
(let $25 (DqCnBroadcast (TDqOutput $24 '0)))
(let $26 '('Many 'Hashed 'Compact))
(let $27 '"SortedBySubkeyValue")
(let $28 '('"subkey" '"value"))
(let $29 (YqlRowSpec $2 $3 $4 $6 '('SortDirections '($7 $7)) '('SortMembers $28) '('SortedBy $28) '('SortedByTypes '($9 $9))))
(let $30 (YtStat '('Id $27) '('RecordsCount '"14") '('DataSize '"608") $12 $13 $14))
(let $31 (YtTable $27 $29 $11 $30 '() (Void) (Void) '"/Root/plato"))
(let $32 (YtReadTable! world $1 '((YtSection '((YtPath $31 $17 (Void) (Void) (Void))) '()))))
(let $33 '('"a.subkey"))
(let $34 '('"b.key"))
(let $35 '('"a.key" $9))
(let $36 '('"a.subkey" $9))
(let $37 '('"a.value" $9))
(let $38 '('"b.key" $9))
(let $39 '('"b.subkey" $9))
(let $40 '('"b.value" $9))
(let $41 (StructType $35 $36 $37 $38 $39 $40))
(let $42 '('('"_logical_id" '4735) '('"_id" '"7d2d50d5-5cd988e0-340d61ad-e70a4795") '('"_wide_channels" $41)))
(let $43 (DqPhyStage '($25) (lambda '($93) (block '(
  (let $94 (NarrowSqueezeToDict (ToFlow $93) (lambda '($95 $96 $97) $95) (lambda '($98 $99 $100) (AsStruct '('"key" $98) '('"subkey" $99) '('"value" $100))) $26))
  (return (FromFlow (WideSort (FlatMap $94 (lambda '($101) (block '(
    (let $102 '('0 '0 '1 '1 '2 '2))
    (let $103 '('"key" '3 '"subkey" '4 '"value" '5))
    (return (MapJoinCore (DqReadWideWrap $32 '()) $101 'Inner '('1) $8 $102 $103 $33 $34))
  )))) '('('1 $7) '('3 $7)))))
))) $42))
(let $44 '('1 '"Asc"))
(let $45 '('3 '"Asc"))
(let $46 (DqCnMerge (TDqOutput $43 '0) '($44 $45)))
(let $47 (DqPhyStage '($46) (lambda '($104) (FromFlow (NarrowMap (ToFlow $104) (lambda '($105 $106 $107 $108 $109 $110) (AsStruct '('"a.key" $105) '('"a.subkey" $106) '('"a.value" $107) '('"b.key" $108) '('"b.subkey" $109) '('"b.value" $110)))))) '('('"_logical_id" '4747) '('"_id" '"a70da6ef-a2803b14-53219a71-6456c415"))))
(let $48 '($24 $43 $47))
(let $49 (DqCnResult (TDqOutput $47 '0) '()))
(let $50 '('('"type" '"generic")))
(let $51 (KqpPhysicalTx $48 '($49) '() $50))
(let $52 '('('"_logical_id" '4824) '('"_id" '"5b1c8e20-c5be4bc2-e44f0f79-4a39f9a4") '('"_wide_channels" (StructType $20))))
(let $53 (DqPhyStage '() (lambda '() (block '(
  (let $111 (YtReadTable! world $1 '((YtSection '((YtPath $16 $8 (Void) (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $111 '())))
))) $52))
(let $54 (DqCnBroadcast (TDqOutput $53 '0)))
(let $55 '('"subkey"))
(let $56 (StructType $36 $38))
(let $57 '('('"_logical_id" '4918) '('"_id" '"7e05ca85-d16956aa-67a240e0-1c3593ad") '('"_wide_channels" $56)))
(let $58 (DqPhyStage '($54) (lambda '($112) (block '(
  (let $113 (NarrowSqueezeToDict (ToFlow $112) (lambda '($114) $114) (lambda '($115) (AsStruct '('"key" $115))) $26))
  (return (FromFlow (WideSort (FlatMap $113 (lambda '($116) (block '(
    (let $117 (YtReadTable! world $1 '((YtSection '((YtPath $31 $55 (Void) (Void) (Void))) '()))))
    (return (MapJoinCore (DqReadWideWrap $117 '()) $116 'Inner '('0) $8 '('0 '0) '('"key" '1) $33 $34))
  )))) '('('0 $7) '('1 $7)))))
))) $57))
(let $59 (DqCnMerge (TDqOutput $58 '0) '('('0 '"Asc") $44)))
(let $60 (DqPhyStage '($59) (lambda '($118) (FromFlow (NarrowMap (ToFlow $118) (lambda '($119 $120) (AsStruct '('"a.subkey" $119) '('"b.key" $120)))))) '('('"_logical_id" '4930) '('"_id" '"977f0244-1d8fc2dd-462aaf04-b817e97"))))
(let $61 '($53 $58 $60))
(let $62 (DqCnResult (TDqOutput $60 '0) '('"a.subkey" '"b.key")))
(let $63 (KqpPhysicalTx $61 '($62) '() $50))
(let $64 '('('"_logical_id" '5019) '('"_id" '"ebd48bf2-229a7edc-f0a574e3-aea8cd07") $22))
(let $65 (DqPhyStage '() (lambda '() (FromFlow $19)) $64))
(let $66 (DqCnBroadcast (TDqOutput $65 '0)))
(let $67 (OptionalType $9))
(let $68 (StructType $35 $36 $37 '('"b.key" $67) '('"b.subkey" $67) '('"b.value" $67)))
(let $69 '('('"_logical_id" '5117) '('"_id" '"99bf1f8e-f3f92608-2e4f7903-ce2cfb83") '('"_wide_channels" $68)))
(let $70 (DqPhyStage '($66) (lambda '($121) (block '(
  (let $122 (NarrowSqueezeToDict (ToFlow $121) (lambda '($123 $124 $125) $123) (lambda '($126 $127 $128) (AsStruct '('"key" $126) '('"subkey" $127) '('"value" $128))) $26))
  (return (FromFlow (WideSort (FlatMap $122 (lambda '($129) (block '(
    (let $130 '('0 '0 '1 '1 '2 '2))
    (let $131 '('"key" '3 '"subkey" '4 '"value" '5))
    (return (MapJoinCore (DqReadWideWrap $32 '()) $129 'Left '('1) $8 $130 $131 $33 $34))
  )))) '('('1 $7)))))
))) $69))
(let $71 (DqCnMerge (TDqOutput $70 '0) '($44)))
(let $72 (DqPhyStage '($71) (lambda '($132) (FromFlow (NarrowMap (ToFlow $132) (lambda '($133 $134 $135 $136 $137 $138) (AsStruct '('"a.key" $133) '('"a.subkey" $134) '('"a.value" $135) '('"b.key" $136) '('"b.subkey" $137) '('"b.value" $138)))))) '('('"_logical_id" '5129) '('"_id" '"1733e3d6-2855f094-797816ef-595d6283"))))
(let $73 '($65 $70 $72))
(let $74 (DqCnResult (TDqOutput $72 '0) '()))
(let $75 (KqpPhysicalTx $73 '($74) '() $50))
(let $76 '('('"_logical_id" '5190) '('"_id" '"a5173d61-1a645390-f287649c-96c29bdd") $22))
(let $77 (DqPhyStage '() (lambda '() (FromFlow (DqReadWideWrap $32 '()))) $76))
(let $78 (DqCnBroadcast (TDqOutput $77 '0)))
(let $79 (StructType '('"a.key" $67) '('"a.subkey" $67) '('"a.value" $67) $38 $39 $40))
(let $80 '('('"_logical_id" '5322) '('"_id" '"25e135e8-26e31053-8fb66d06-61c9f29a") '('"_wide_channels" $79)))
(let $81 (DqPhyStage '($78) (lambda '($139) (block '(
  (let $140 (NarrowSqueezeToDict (ToFlow $139) (lambda '($141 $142 $143) $142) (lambda '($144 $145 $146) (AsStruct '('"key" $144) '('"subkey" $145) '('"value" $146))) $26))
  (return (FromFlow (WideSort (FlatMap $140 (lambda '($147) (block '(
    (let $148 '('0 '3 '1 '4 '2 '5))
    (let $149 '('"key" '0 '"subkey" '1 '"value" '2))
    (return (MapJoinCore (DqReadWideWrap $18 '()) $147 'Left '('0) $55 $148 $149 $33 $34))
  )))) '('('3 $7)))))
))) $80))
(let $82 (DqCnMerge (TDqOutput $81 '0) '($45)))
(let $83 (DqPhyStage '($82) (lambda '($150) (FromFlow (NarrowMap (ToFlow $150) (lambda '($151 $152 $153 $154 $155 $156) (AsStruct '('"a.key" $151) '('"a.subkey" $152) '('"a.value" $153) '('"b.key" $154) '('"b.subkey" $155) '('"b.value" $156)))))) '('('"_logical_id" '5334) '('"_id" '"a9c25994-42b514be-28f952e6-13e4717a"))))
(let $84 '($77 $81 $83))
(let $85 (DqCnResult (TDqOutput $83 '0) '()))
(let $86 (KqpPhysicalTx $84 '($85) '() $50))
(let $87 '($51 $63 $75 $86))
(let $88 (KqpTxResultBinding (ListType $41) '0 '0))
(let $89 (KqpTxResultBinding (ListType $56) '1 '0))
(let $90 (KqpTxResultBinding (ListType $68) '"2" '0))
(let $91 (KqpTxResultBinding (ListType $79) '"3" '0))
(let $92 '($88 $89 $90 $91))
(return (KqpPhysicalQuery $87 $92 '('('"type" '"query"))))
)
