(
(let $1 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
(let $2 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $1)))
(let $3 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
(let $4 (YtStat '('Id '"Input") '('RecordsCount '3) '('DataSize '"132") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
(let $5 (YtTable '"Input" $2 $3 $4 '() (Void) (Void) '"/Root/plato"))
(let $6 '('"key" '"subkey" '"value"))
(let $7 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $5 $6 (Void) (Void))) '()))))
(let $8 (DqReadWideWrap $7 '()))
(let $9 (String '"wat"))
(let $10 (String '"bar"))
(let $11 (lambda '() (block '(
  (let $39 (lambda '($40 $41 $42) $40 $41 (Or (== $42 $9) (== $42 $10))))
  (return (FromFlow (WideMap $8 $39)))
))))
(let $12 '('"_logical_id" '1438))
(let $13 (DataType 'String))
(let $14 '('"key" $13))
(let $15 (DataType 'Bool))
(let $16 '('"value" $15))
(let $17 (StructType $14 '('"subkey" $13) $16))
(let $18 '('"_wide_channels" $17))
(let $19 '($12 '('"_id" '"d44333a1-b34ab81e-260c1479-f529fddc") $18))
(let $20 (DqPhyStage '() $11 $19))
(let $21 '($12 '('"_id" '"c9374151-bf112253-1019acc7-405788d9") $18))
(let $22 (DqPhyStage '() $11 $21))
(let $23 '($12 '('"_id" '"6551b414-390d1694-ceec3c6-753a5e56") '('"_wide_channels" (StructType $14 $16))))
(let $24 (DqPhyStage '() (lambda '() (block '(
  (let $43 (lambda '($44 $45 $46) $44 (Or (== $46 $9) (== $46 $10))))
  (return (FromFlow (WideMap $8 $43)))
))) $23))
(let $25 (DqCnMap (TDqOutput $20 '0)))
(let $26 (DqCnBroadcast (TDqOutput $22 '0)))
(let $27 (DqCnBroadcast (TDqOutput $24 '0)))
(let $28 '($25 $26 $27))
(let $29 (OptionalType $13))
(let $30 (OptionalType $15))
(let $31 (StructType '('"R0.key" $13) '('"R0.subkey" $13) '('"R0.value" $15) '('"R1.key" $29) '('"R1.subkey" $29) '('"R1.value" $30) '('"R2.key" $29) '('"R2.value" $30)))
(let $32 '('('"_logical_id" '1549) '('"_id" '"1da1ff43-9f2fbb8c-9f813d64-648df56b") '('"_wide_channels" $31)))
(let $33 (DqPhyStage $28 (lambda '($47 $48 $49) (block '(
  (let $50 '('Many 'Hashed 'Compact))
  (let $51 (NarrowSqueezeToDict (ToFlow $49) (lambda '($52 $53) $52) (lambda '($54 $55) (AsStruct '('"key" $54) '('"value" $55))) $50))
  (return (FromFlow (WideSort (FlatMap $51 (lambda '($56) (block '(
    (let $57 (NarrowSqueezeToDict (ToFlow $48) (lambda '($61 $62 $63) $61) (lambda '($64 $65 $66) (AsStruct '('"key" $64) '('"subkey" $65) '('"value" $66))) $50))
    (let $58 '('"key"))
    (let $59 '('0 '0 '1 '1 '2 '2 '3 '3 '4 '4 '5 '5))
    (let $60 '('"key" '6 '"value" '7))
    (return (MapJoinCore (FlatMap $57 (lambda '($67) (block '(
      (let $68 '('0 '0 '1 '1 '2 '2))
      (let $69 '('"key" '3 '"subkey" '4 '"value" '5))
      (return (MapJoinCore (ToFlow $47) $67 'Left '('1) $58 $68 $69 '('"R0.subkey") '('"R1.key")))
    )))) $56 'Left '('4) $58 $59 $60 '('"R1.subkey") '('"R2.key")))
  )))) '('('0 (Bool 'true))))))
))) $32))
(let $34 (DqCnMerge (TDqOutput $33 '0) '('('0 '"Asc"))))
(let $35 (DqPhyStage '($34) (lambda '($70) (FromFlow (NarrowMap (ToFlow $70) (lambda '($71 $72 $73 $74 $75 $76 $77 $78) (AsStruct '('"R0.key" $71) '('"R0.subkey" $72) '('"R0.value" $73) '('"R1.key" $74) '('"R1.subkey" $75) '('"R1.value" $76) '('"R2.key" $77) '('"R2.value" $78)))))) '('('"_logical_id" '1561) '('"_id" '"81ed287a-dc8951cb-a5f173da-482e611b"))))
(let $36 '($20 $22 $24 $33 $35))
(let $37 '('"R0.key" '"R0.subkey" '"R0.value" '"R1.key" '"R1.subkey" '"R1.value" '"R2.key" '"R2.value"))
(let $38 (DqCnResult (TDqOutput $35 '0) $37))
(return (KqpPhysicalQuery '((KqpPhysicalTx $36 '($38) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $31) '0 '0)) '('('"type" '"query"))))
)
