(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
(let $3 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $2)))
(let $4 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
(let $5 '('RecordsCount '"4"))
(let $6 '('DataSize '"166"))
(let $7 '('ChunkCount '1))
(let $8 '('ModifyTime '0))
(let $9 '('Revision '0))
(let $10 (DataType 'String))
(let $11 '('('"_logical_id" '1454) '('"_id" '"b65ea0de-698fe674-a2bffe57-f91b42de") '('"_wide_channels" (StructType '('"subkey" $10) '('"value" $10)))))
(let $12 (DqPhyStage '() (lambda '() (block '(
  (let $23 (YtStat '('Id '"Input2") $5 $6 $7 $8 $9))
  (let $24 (YtTable '"Input2" $3 $4 $23 '() (Void) (Void) '"/Root/plato"))
  (let $25 (YtReadTable! world $1 '((YtSection '((YtPath $24 '('"subkey" '"value") (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $25 '())))
))) $11))
(let $13 (DqCnBroadcast (TDqOutput $12 '0)))
(let $14 (StructType '('"a.key" $10) '('"a.subkey" $10) '('"b.subkey" $10) '('"b.value" $10)))
(let $15 '('('"_logical_id" '1594) '('"_id" '"957d1020-b2d4afc6-ebf47e05-efe6bd96") '('"_wide_channels" $14)))
(let $16 (DqPhyStage '($13) (lambda '($26) (block '(
  (let $27 (Condense1 (NarrowMap (ToFlow $26) (lambda '($32 $33) (AsStruct '('"subkey" $32) '('"value" $33)))) (lambda '($34) (AsList $34)) (lambda '($35 $36) (Bool '"false")) (lambda '($37 $38) (Append $38 $37))))
  (let $28 (Bool 'true))
  (let $29 '($28 $28 $28 $28))
  (let $30 (Sort (FlatMap $27 (lambda '($39) (block '(
    (let $40 (YtStat '('Id '"Input1") $5 $6 $7 $8 $9))
    (let $41 (YtTable '"Input1" $3 $4 $40 '() (Void) (Void) '"/Root/plato"))
    (let $42 (YtReadTable! world $1 '((YtSection '((YtPath $41 '('"key" '"subkey") (Void) (Void))) '()))))
    (return (NarrowFlatMap (DqReadWideWrap $42 '()) (lambda '($43 $44) (Map (Collect $39) (lambda '($45) (AsStruct '('"a.key" $43) '('"a.subkey" (Concat $44 $43)) '('"b.subkey" (Member $45 '"subkey")) '('"b.value" (Member $45 '"value"))))))))
  )))) $29 (lambda '($46) '((Member $46 '"a.key") (Member $46 '"a.subkey") (Member $46 '"b.subkey") (Member $46 '"b.value")))))
  (let $31 (lambda '($47) (Member $47 '"a.key") (Member $47 '"a.subkey") (Member $47 '"b.subkey") (Member $47 '"b.value")))
  (return (FromFlow (ExpandMap $30 $31)))
))) $15))
(let $17 '('('0 '"Asc") '('1 '"Asc") '('"2" '"Asc") '('"3" '"Asc")))
(let $18 (DqCnMerge (TDqOutput $16 '0) $17))
(let $19 (DqPhyStage '($18) (lambda '($48) (FromFlow (NarrowMap (ToFlow $48) (lambda '($49 $50 $51 $52) (AsStruct '('"a.key" $49) '('"a.subkey" $50) '('"b.subkey" $51) '('"b.value" $52)))))) '('('"_logical_id" '1606) '('"_id" '"ed4a494d-6fc12737-35027fff-6570bd9d"))))
(let $20 '($12 $16 $19))
(let $21 '('"a.key" '"a.subkey" '"b.subkey" '"b.value"))
(let $22 (DqCnResult (TDqOutput $19 '0) $21))
(return (KqpPhysicalQuery '((KqpPhysicalTx $20 '($22) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $14) '0 '0)) '('('"type" '"query"))))
)
