(
(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" '3527) '('"_id" '"ec255f9f-4152c7f2-e068aff-b2f497b7") '('"_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) (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" '3681) '('"_id" '"543a131-6093778c-5a59c176-7c41435e") '('"_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) (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" '3693) '('"_id" '"294fedf7-c16a8a66-3de22ae3-3924145c"))))
(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"))))
)
