(
(let $1 (DataType 'String))
(let $2 (StructType '('"key" $1) '('"subkey" $1) '('"value" $1)))
(let $3 '('('"_logical_id" '1787) '('"_id" '"91bc6740-94bc8ed1-f7449b3e-5ca575d") '('"_wide_channels" $2)))
(let $4 (DqPhyStage '() (lambda '() (block '(
  (let $8 (OptionalType (DataType 'Uint64)))
  (let $9 '('One 'Hashed 'Compact))
  (let $10 (SqueezeToDict (FlatMap (ToFlow (AsList (AsStruct '('"key" (String '1)) '('"subkey" (String '"a"))) (AsStruct '('"key" (String '"4")) '('"subkey" (String '"d"))) (AsStruct '('"key" (String '"-5")) '('"subkey" (String '"e"))))) (lambda '($11) (block '(
    (let $12 (IfPresent (SafeCast (Member $11 '"subkey") (OptionalType (DataType 'Utf8))) (lambda '($13) (Just (SafeCast $13 $1))) (Nothing (OptionalType $1))))
    (return (FilterNullElements (Just '((SafeCast (SafeCast (Member $11 '"key") (OptionalType (DataType 'Int64))) $8) $12)) '('0 '1)))
  )))) (lambda '($14) $14) (lambda '($15) (Void)) $9))
  (return (FromFlow (WideSort (FlatMap $10 (lambda '($16) (block '(
    (let $17 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
    (let $18 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $17)))
    (let $19 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
    (let $20 (YtStat '('Id '"Input") '('RecordsCount '"4") '('DataSize '"186") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
    (let $21 (YtTable '"Input" $18 $19 $20 '() (Void) (Void) '"/Root/plato"))
    (let $22 '('"key" '"subkey" '"value"))
    (let $23 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $21 $22 (Void) (Void))) '()))))
    (let $24 '('0))
    (let $25 (lambda '($27 $28 $29) (FilterNullElements (Just '((SafeCast $27 $8) $28)) $24) $27 $28 $29))
    (let $26 '('1 '0 '2 '1 '3 '2))
    (return (MapJoinCore (WideMap (DqReadWideWrap $23 '()) $25) $16 'LeftSemi $24 '('"_equijoin_column_1") $26 '() '('"A._equijoin_column_0") '('"B._equijoin_column_1")))
  )))) '('('0 (Bool 'true))))))
))) $3))
(let $5 (DqCnMerge (TDqOutput $4 '0) '('('0 '"Asc"))))
(let $6 (DqPhyStage '($5) (lambda '($30) (FromFlow (NarrowMap (ToFlow $30) (lambda '($31 $32 $33) (AsStruct '('"key" $31) '('"subkey" $32) '('"value" $33)))))) '('('"_logical_id" '1799) '('"_id" '"f542663b-f02b177c-9cff296d-6b54cde"))))
(let $7 (DqCnResult (TDqOutput $6 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx '($4 $6) '($7) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $2) '0 '0)) '('('"type" '"query"))))
)
