(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '('NativeYtTypeFlags '0))
(let $3 '('StrictSchema '1))
(let $4 '('UniqueKeys '0))
(let $5 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
(let $6 '('Type $5))
(let $7 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
(let $8 '('ChunkCount '1))
(let $9 '('ModifyTime '0))
(let $10 '('Revision '0))
(let $11 '('"value"))
(let $12 (lambda '($46) $46))
(let $13 (lambda '($49 $50 $51) $51))
(let $14 (DataType 'String))
(let $15 '('"value" $14))
(let $16 '('"_wide_channels" (StructType $15)))
(let $17 '('('"_logical_id" '4212) '('"_id" '"f97a6820-7edd7a7d-d4a83f6d-7e9786f3") $16))
(let $18 (DqPhyStage '() (lambda '() (block '(
  (let $42 (YqlRowSpec $2 $3 $4 $6))
  (let $43 (YtStat '('Id '"Input") '('RecordsCount '"4") '('DataSize '"166") $8 $9 $10))
  (let $44 (YtTable '"Input" $42 $7 $43 '() (Void) (Void) '"/Root/plato"))
  (let $45 (YtReadTable! world $1 '((YtSection '((YtPath $44 $11 (Void) (Void))) '()))))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (DqReadWideWrap $45 '()))) '-1073741824 $12 (lambda '($47 $48) $47) $13 (lambda '($52 $53) $53)))
))) $17))
(let $19 (DqCnHashShuffle (TDqOutput $18 '0) '('0) '0 '"HashV2"))
(let $20 '('"_partition_mode" '"aggregate"))
(let $21 '('('"_logical_id" '4296) '('"_id" '"af5a7a4c-358f1f8e-e1f61898-c81de26c") $20 $16))
(let $22 (DqPhyStage '($19) (lambda '($54) (block '(
  (let $55 (NarrowSqueezeToDict (ToFlow (WideFromBlocks $54)) $12 (lambda '($57) (AsStruct '('"value" $57))) '('Auto 'Many)))
  (let $56 (Condense1 (OrderedFlatMap $55 (lambda '($58) (OrderedFlatMap (DictPayloads $58) (lambda '($59) $59)))) (lambda '($60) (Member $60 '"value")) (lambda '($61 $62) (AggrNotEquals (Member $61 '"value") $62)) (lambda '($63 $64) $64)))
  (return (FromFlow (ExpandMap $56 $12)))
))) $21))
(let $23 (DqCnBroadcast (TDqOutput $22 '0)))
(let $24 (TupleType $14 $14 $14))
(let $25 (DataType 'Uint32))
(let $26 (ResourceType '"Set.SetResource.Generic"))
(let $27 '($26))
(let $28 '('('"strict")))
(let $29 (TupleType (TupleType $26) (StructType) $24))
(let $30 (ListType $24))
(let $31 (TupleType $25 $30))
(let $32 '($31))
(let $33 '('('"_logical_id" '4580) '('"_id" '"e1772939-26c8302a-5574902f-cac4eb60") '('"_wide_channels" (StructType '('_yql_agg_0 $31) $15))))
(let $34 (DqPhyStage '($23) (lambda '($65) (block '(
  (let $66 '('One 'Hashed 'Compact))
  (let $67 (NarrowSqueezeToDict (ToFlow $65) $12 (lambda '($72) (Void)) $66))
  (let $68 '($24))
  (let $69 (Uint32 '0))
  (let $70 (DependsOn $69))
  (let $71 (lambda '($99 $100) (block '(
    (let $101 (CallableType '() $32 $27))
    (let $102 (Udf '"Set.Serialize" (Void) $29 '"" $101 (VoidType) '"" $28))
    (return (Apply $102 $100) $99)
  ))))
  (return (WideFromBlocks (DqPhyHashCombine (WideToBlocks (FromFlow (FlatMap $67 (lambda '($73) (block '(
    (let $74 (Bool 'true))
    (let $75 '('"key" '"subkey"))
    (let $76 (YqlRowSpec $2 $3 $4 $6 '('SortDirections '($74 $74)) '('SortMembers $75) '('SortedBy $75) '('SortedByTypes '($14 $14))))
    (let $77 (YtStat '('Id '"InputSorted") '('RecordsCount '"6") '('DataSize '"252") $8 $9 $10))
    (let $78 (YtTable '"InputSorted" $76 $7 $77 '() (Void) (Void) '"/Root/plato"))
    (let $79 '('"key" '"subkey" '"value"))
    (let $80 (YtReadTable! world $1 '((YtSection '((YtPath $78 $79 (Void) (Void))) '('('"unordered"))))))
    (let $81 '('0 '0 '1 '1 '2 '2))
    (return (MapJoinCore (DqReadWideWrap $80 '()) $73 'LeftSemi '('2) $11 $81 '() '('"_yql_injoin_input.value") '('"_yql_injoin_0.value")))
  )))))) '-1073741824 $13 (lambda '($82 $83 $84 $85) (block '(
    (let $86 (TupleType (TupleType $24 $25) (StructType) $24))
    (let $87 (CallableType '() $27 $68 '($25)))
    (let $88 (Udf '"Set.Create" (Void) $86 '"" $87 (VoidType) '"" $28))
    (let $89 '($83 $84 $85))
    (return (NamedApply $88 '($89 $69) (AsStruct) $70))
  ))) (lambda '($90 $91 $92 $93 $94) (block '(
    (let $95 (TupleType (TupleType $26 $24) (StructType) $24))
    (let $96 (CallableType '() $27 $27 $68))
    (let $97 (Udf '"Set.AddValue" (Void) $95 '"" $96 (VoidType) '"" $28))
    (let $98 '($91 $92 $93))
    (return (NamedApply $97 '($94 $98) (AsStruct) $70))
  ))) $71)))
))) $33))
(let $35 (DqCnHashShuffle (TDqOutput $34 '0) '('1) '0 '"HashV2"))
(let $36 '('('"_logical_id" '5123) '('"_id" '"78740365-488707ad-64a35e8b-e7bb8b4c") $20))
(let $37 (DqPhyStage '($35) (lambda '($103) (block '(
  (let $104 (TupleType (TupleType $31) (StructType) $24))
  (let $105 (CallableType '() $27 $32))
  (let $106 (Udf '"Set.Deserialize" (Void) $104 '"" $105 (VoidType) '"" '()))
  (let $107 (lambda '($121 $122) (block '(
    (let $123 (CallableType '() '($30) $27))
    (let $124 (Udf '"Set.GetResult" (Void) $29 '"" $123 (VoidType) '"" $28))
    (return (Apply $124 $122) $121)
  ))))
  (let $108 (WideCombiner (ToFlow $103) '"" (lambda '($109 $110) $110) (lambda '($111 $112 $113) (Apply $106 $112)) (lambda '($114 $115 $116 $117) (block '(
    (let $118 (TupleType (TupleType $26 $26) (StructType) $24))
    (let $119 (CallableType '() $27 $27 $27))
    (let $120 (Udf '"Set.Merge" (Void) $118 '"" $119 (VoidType) '"" $28))
    (return (Apply $120 (Apply $106 $115) $117))
  ))) $107))
  (return (FromFlow (NarrowMap $108 (lambda '($125 $126) (AsStruct '('"tuples" $125) '('"value" $126))))))
))) $36))
(let $38 (DqCnUnionAll (TDqOutput $37 '0)))
(let $39 (DqPhyStage '($38) (lambda '($127) $127) '('('"_logical_id" '5624) '('"_id" '"2cb36cf5-c784f40-ef56df0e-7922967d"))))
(let $40 '($18 $22 $34 $37 $39))
(let $41 (DqCnResult (TDqOutput $39 '0) '('"value" '"tuples")))
(return (KqpPhysicalQuery '((KqpPhysicalTx $40 '($41) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType (StructType '('"tuples" $30) $15)) '0 '0)) '('('"type" '"query"))))
)
