(
(let $1 (DataType 'Utf8))
(let $2 (StructType '('"key" $1) '('"key1" $1) '('"subkey" $1) '('"subkey1" $1) '('"value" $1)))
(let $3 '('('"_logical_id" '2019) '('"_id" '"51755828-998ae567-6b1188e6-b7b8148f") '('"_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) '('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))) '()))))
    (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" '2031) '('"_id" '"8ad75813-6bf8aa31-3de77a8-297558ec"))))
(let $7 (DqCnResult (TDqOutput $6 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx '($4 $6) '($7) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $2) '0 '0)) '('('"type" '"query"))))
)
