(
(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"))
(let $11 (DataType 'String))
(let $12 '('('"_logical_id" '3523) '('"_id" '"9e89aa2d-21a6f78f-37a7df52-5cde7805") '('"_wide_channels" (StructType '('"key" $11)))))
(let $13 (DqPhyStage '() (lambda '() (block '(
  (let $24 (YtStat '('Id '"Input2") $5 $6 $7 $8 $9))
  (let $25 (YtTable '"Input2" $3 $4 $24 '() (Void) (Void) '"/Root/plato"))
  (let $26 (YtReadTable! world $1 '((YtSection '((YtPath $25 $10 (Void) (Void))) '()))))
  (return (FromFlow (DqReadWideWrap $26 '())))
))) $12))
(let $14 (DqCnBroadcast (TDqOutput $13 '0)))
(let $15 (OptionalType (DataType 'Int32)))
(let $16 (StructType '('"a.subkey" $11) '('"akey" $11) '('"b.subkey" (NullType)) '('"b.value" $15) '('"bkey" (OptionalType $11))))
(let $17 '('('"_logical_id" '3677) '('"_id" '"ee628756-5ec191df-362e629c-3be98f5b") '('"_wide_channels" $16)))
(let $18 (DqPhyStage '($14) (lambda '($27) (block '(
  (let $28 '('Many 'Hashed 'Compact))
  (let $29 (NarrowSqueezeToDict (ToFlow $27) (lambda '($31) $31) (lambda '($32) (AsStruct '('"key" $32))) $28))
  (let $30 (lambda '($38 $39 $40) (block '(
    (let $41 (If (Exists $40) (Just (Int32 '1)) (Nothing $15)))
    (return $39 $38 (Null) $41 $40)
  ))))
  (return (FromFlow (WideMap (WideSort (FlatMap $29 (lambda '($33) (block '(
    (let $34 (YtStat '('Id '"Input1") $5 $6 $7 $8 $9))
    (let $35 (YtTable '"Input1" $3 $4 $34 '() (Void) (Void) '"/Root/plato"))
    (let $36 (YtReadTable! world $1 '((YtSection '((YtPath $35 '('"key" '"subkey") (Void) (Void))) '()))))
    (let $37 '('0 '0 '1 '1))
    (return (MapJoinCore (DqReadWideWrap $36 '()) $33 'Left '('0) $10 $37 '('"key" '2) '('"a.key") '('"b.key")))
  )))) '('('0 (Bool 'true)))) $30)))
))) $17))
(let $19 (DqCnMerge (TDqOutput $18 '0) '('('1 '"Asc"))))
(let $20 (DqPhyStage '($19) (lambda '($42) (FromFlow (NarrowMap (ToFlow $42) (lambda '($43 $44 $45 $46 $47) (AsStruct '('"a.subkey" $43) '('"akey" $44) '('"b.subkey" $45) '('"b.value" $46) '('"bkey" $47)))))) '('('"_logical_id" '3689) '('"_id" '"90abc78e-ad6476d0-3b75a5c5-d303ba96"))))
(let $21 '($13 $18 $20))
(let $22 '('"akey" '"bkey" '"a.subkey" '"b.subkey" '"b.value"))
(let $23 (DqCnResult (TDqOutput $20 '0) $22))
(return (KqpPhysicalQuery '((KqpPhysicalTx $21 '($23) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $16) '0 '0)) '('('"type" '"query"))))
)
