(
(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 '('"key" '"subkey"))
(let $11 (DataType 'String))
(let $12 '('('"_logical_id" '4259) '('"_id" '"83710c86-3b326ba-80bb2c27-8b2c879e") '('"_wide_channels" (StructType '('"key" $11) '('"subkey" $11)))))
(let $13 (DqPhyStage '() (lambda '() (block '(
  (let $25 (YtStat '('Id '"Input2") $5 $6 $7 $8 $9))
  (let $26 (YtTable '"Input2" $3 $4 $25 '() (Void) (Void) '"/Root/plato"))
  (let $27 (YtReadTable! world $1 '((YtSection '((YtPath $26 $10 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $27 '())))
))) $12))
(let $14 (DqCnBroadcast (TDqOutput $13 '0)))
(let $15 (OptionalType $11))
(let $16 (OptionalType (DataType 'Int32)))
(let $17 (StructType '('"a.subkey" $11) '('"akey" $11) '('"b.subkey" $15) '('"b.value" $16) '('"bkey" $15)))
(let $18 '('('"_logical_id" '4435) '('"_id" '"98e50b90-ad98f4eb-6f27a392-a617b694") '('"_wide_channels" $17)))
(let $19 (DqPhyStage '($14) (lambda '($28) (block '(
  (let $29 '('Many 'Hashed 'Compact))
  (let $30 (NarrowSqueezeToDict (ToFlow $28) (lambda '($32 $33) $32) (lambda '($34 $35) (AsStruct '('"key" $34) '('"subkey" $35))) $29))
  (let $31 (lambda '($42 $43 $44 $45) (block '(
    (let $46 (IfPresent (FilterNullMembers (AssumeAllMembersNullableAtOnce (Just (AsStruct '('"key" $44) '('"subkey" $45)))) $10) (lambda '($48) (Just (Concat (Member $48 '"key") (Member $48 '"subkey")))) (Nothing $15)))
    (let $47 (If (Exists $44) (Just (Int32 '1)) (Nothing $16)))
    (return (Concat $43 $42) $42 $46 $47 $44)
  ))))
  (return (FromFlow (WideMap (WideSort (FlatMap $30 (lambda '($36) (block '(
    (let $37 (YtStat '('Id '"Input1") $5 $6 $7 $8 $9))
    (let $38 (YtTable '"Input1" $3 $4 $37 '() (Void) (Void) '"/Root/plato"))
    (let $39 (YtReadTable! world $1 '((YtSection '((YtPath $38 $10 (Void) (Void))) '()))))
    (let $40 '('0 '0 '1 '1))
    (let $41 '('"key" '2 '"subkey" '3))
    (return (MapJoinCore (DqReadWideWrap $39 '()) $36 'Left '('0) '('"key") $40 $41 '('"a.key") '('"b.key")))
  )))) '('('0 (Bool 'true)))) $31)))
))) $18))
(let $20 (DqCnMerge (TDqOutput $19 '0) '('('1 '"Asc"))))
(let $21 (DqPhyStage '($20) (lambda '($49) (FromFlow (NarrowMap (ToFlow $49) (lambda '($50 $51 $52 $53 $54) (AsStruct '('"a.subkey" $50) '('"akey" $51) '('"b.subkey" $52) '('"b.value" $53) '('"bkey" $54)))))) '('('"_logical_id" '4447) '('"_id" '"7678bfe0-89727198-1849599b-9a1519f0"))))
(let $22 '($13 $19 $21))
(let $23 '('"akey" '"bkey" '"a.subkey" '"b.subkey" '"b.value"))
(let $24 (DqCnResult (TDqOutput $21 '0) $23))
(return (KqpPhysicalQuery '((KqpPhysicalTx $22 '($24) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $17) '0 '0)) '('('"type" '"query"))))
)
