(
(let $1 (DataType 'Utf8))
(let $2 (StructType '('"key" $1) '('"key1" $1) '('"subkey" $1) '('"subkey1" $1) '('"value" $1)))
(let $3 '('('"_logical_id" '2028) '('"_id" '"f6dab4db-7032036b-83c3cb70-863f47bc") '('"_wide_channels" $2)))
(let $4 (DqPhyStage '() (lambda '() (block '(
  (let $8 (String '"a"))
  (let $9 (AsStruct '('"key" (String '1)) '('"subkey" $8) '('"subkey1" $8)))
  (let $10 (String '"d"))
  (let $11 (AsStruct '('"key" (String '4)) '('"subkey" $10) '('"subkey1" $10)))
  (let $12 (String '"e"))
  (let $13 (AsStruct '('"key" (String '"-5")) '('"subkey" $12) '('"subkey1" $12)))
  (let $14 '('One 'Hashed 'Compact))
  (let $15 (SqueezeToDict (FlatMap (ToFlow (AsList $9 $11 $13)) (lambda '($16) (block '(
    (let $17 (OptionalType $1))
    (let $18 '('0 '1))
    (return (FilterNullElements (Just '((SafeCast (Member $16 '"key") $17) (FilterNullElements (Just '((SafeCast (Member $16 '"subkey") $17) (SafeCast (Member $16 '"subkey1") $17))) $18))) $18))
  )))) (lambda '($19) $19) (lambda '($20) (Void)) $14))
  (return (FromFlow (WideSort (FlatMap $15 (lambda '($21) (block '(
    (let $22 '@@["StructType";[["key1";["DataType";"Utf8"]];["subkey1";["DataType";"Utf8"]];["key";["DataType";"Utf8"]];["subkey";["DataType";"Utf8"]];["value";["DataType";"Utf8"]]]]@@)
    (let $23 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $22)))
    (let $24 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('HasRLS '0) '('Attrs '('('"native_strict_schema" '"false")))))
    (let $25 (YtStat '('Id '"Input") '('RecordsCount '4) '('DataSize '"292") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
    (let $26 (YtTable '"Input" $23 $24 $25 '() (Void) (Void) '"/Root/plato"))
    (let $27 '('"key" '"key1" '"subkey" '"subkey1" '"value"))
    (let $28 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $26 $27 (Void) (Void) (Void))) '()))))
    (let $29 (lambda '($31 $32 $33 $34 $35) '($31 '($33 $34)) $31 $32 $33 $34 $35))
    (let $30 '('1 '0 '2 '1 '3 '2 '4 '3 '5 '4))
    (return (MapJoinCore (WideMap (DqReadWideWrap $28 '()) $29) $21 'LeftOnly '('0) '('"_equijoin_column_1") $30 '() '('"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 '($36) (FromFlow (NarrowMap (ToFlow $36) (lambda '($37 $38 $39 $40 $41) (AsStruct '('"key" $37) '('"key1" $38) '('"subkey" $39) '('"subkey1" $40) '('"value" $41)))))) '('('"_logical_id" '2040) '('"_id" '"fb3864e7-8875cc02-dccc0a44-e9a0210d"))))
(let $7 (DqCnResult (TDqOutput $6 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx '($4 $6) '($7) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $2) '0 '0)) '('('"type" '"query"))))
)
