(
(let $1 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
(let $2 (Bool 'true))
(let $3 '('"key" '"subkey"))
(let $4 (DataType 'String))
(let $5 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $1) '('SortDirections '($2 $2)) '('SortMembers $3) '('SortedBy $3) '('SortedByTypes '($4 $4))))
(let $6 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
(let $7 (YtStat '('Id '"Input8") '('RecordsCount '"4") '('DataSize '"166") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
(let $8 (YtTable '"Input8" $5 $6 $7 '() (Void) (Void) '"/Root/plato"))
(let $9 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $8 $3 (Void) (Void))) '('('"unordered"))))))
(let $10 (DqReadWideWrap $9 '()))
(let $11 '('"_logical_id" '2676))
(let $12 '('"_wide_channels" (StructType '('"key" $4) '('"subkey" $4))))
(let $13 '($11 '('"_id" '"4041df3f-4ca29897-cddb6aa0-87521b39") $12))
(let $14 (DqPhyStage '() (lambda '() (FromFlow (WideFilter $10 (lambda '($41 $42) (!= $42 (String '"bar")))))) $13))
(let $15 '($11 '('"_id" '"f1fbbfd1-89867eb-2d5aec59-b646dd99") $12))
(let $16 (DqPhyStage '() (lambda '() (FromFlow (WideFilter $10 (lambda '($43 $44) (!= $44 (String '"foo")))))) $15))
(let $17 '('0 '1))
(let $18 (DqCnHashShuffle (TDqOutput $16 '0) $17 '0 '"HashV2"))
(let $19 (lambda '($49 $50) '($49 $50)))
(let $20 (lambda '($51 $52) (AsStruct '('"key" $51) '('"subkey" $52))))
(let $21 '('Auto 'Many))
(let $22 (lambda '($53) (OrderedFlatMap (DictPayloads $53) (lambda '($54) $54))))
(let $23 (lambda '($55) $55))
(let $24 (lambda '($56 $57) (Or (AggrNotEquals (Member $56 '"key") (Member $57 '"key")) (AggrNotEquals (Member $56 '"subkey") (Member $57 '"subkey")))))
(let $25 (lambda '($58 $59) $59))
(let $26 '('"_partition_mode" '"aggregate"))
(let $27 '('('"_logical_id" '2749) '('"_id" '"c44fa226-cdbe7967-1a61a5f0-e4a1096b") $26 $12))
(let $28 (DqPhyStage '($18) (lambda '($45) (block '(
  (let $46 (NarrowSqueezeToDict (ToFlow $45) $19 $20 $21))
  (let $47 (Condense1 (OrderedFlatMap $46 $22) $23 $24 $25))
  (let $48 (lambda '($60) (Member $60 '"key") (Member $60 '"subkey")))
  (return (FromFlow (ExpandMap $47 $48)))
))) $27))
(let $29 (DqCnHashShuffle (TDqOutput $14 '0) $17 '0 '"HashV2"))
(let $30 (DqCnBroadcast (TDqOutput $28 '0)))
(let $31 (StructType '('"key1" $4) '('"subkey1" $4)))
(let $32 '('('"_logical_id" '2992) '('"_id" '"7df83f71-18dc0fa7-3931d40b-6809288d") '('"_wide_channels" $31)))
(let $33 (DqPhyStage '($29 $30) (lambda '($61 $62) (block '(
  (let $63 '('Many 'Hashed 'Compact))
  (let $64 (NarrowSqueezeToDict (ToFlow $62) $19 $20 $63))
  (let $65 (lambda '($70) (Member $70 '"a.key") (Member $70 '"a.subkey")))
  (return (FromFlow (ExpandMap (FlatMap $64 (lambda '($66) (block '(
    (let $67 (NarrowSqueezeToDict (ToFlow $61) $19 $20 $21))
    (let $68 (Condense1 (OrderedFlatMap $67 $22) $23 $24 $25))
    (let $69 '('"key" '"a.key" '"subkey" '"a.subkey"))
    (return (MapJoinCore $68 $66 'Inner $3 $3 $69 '() '('"a.key" '"a.subkey") '('"b.key" '"b.subkey")))
  )))) $65)))
))) $32))
(let $34 (DqCnHashShuffle (TDqOutput $33 '0) $17 '0 '"HashV2"))
(let $35 '('('"_logical_id" '3039) '('"_id" '"9ff630e9-6628558b-ed06c03c-b2ef54ee") $26))
(let $36 (DqPhyStage '($34) (lambda '($71) (block '(
  (let $72 (lambda '($75 $76) $75 $76))
  (let $73 (lambda '($77 $78 $79 $80)))
  (let $74 (WideCombiner (ToFlow $71) '"" $72 $73 $73 $72))
  (return (FromFlow (NarrowMap $74 (lambda '($81 $82) (AsStruct '('"key1" $81) '('"subkey1" $82))))))
))) $35))
(let $37 (DqCnUnionAll (TDqOutput $36 '0)))
(let $38 (DqPhyStage '($37) (lambda '($83) $83) '('('"_logical_id" '3645) '('"_id" '"6f3ee4e8-f0594a5d-9e904bed-c6eb665d"))))
(let $39 '($14 $16 $28 $33 $36 $38))
(let $40 (DqCnResult (TDqOutput $38 '0) '('"key1" '"subkey1")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $39 '($40) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $31) '0 '0)) '('('"type" '"query"))))
)
