(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '@@["StructType";[["key";["DataType";"Int32"]];["subkey";["DataType";"Int32"]];["value";["DataType";"String"]];["value_utf";["DataType";"Utf8"]]]]@@)
(let $3 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $2)))
(let $4 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
(let $5 (YtStat '('Id '"Input") '('RecordsCount '"3") '('DataSize '"177") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
(let $6 (YtTable '"Input" $3 $4 $5 '() (Void) (Void) '"/Root/plato"))
(let $7 '('"value" '"value_utf"))
(let $8 '('"value" (DataType 'String)))
(let $9 (StructType $8 '('"value_utf" (DataType 'Utf8))))
(let $10 '('"_wide_channels" $9))
(let $11 '('('"_logical_id" '1826) '('"_id" '"f2cc6cb-4f8473dd-9ec48b39-6e199a82") $10))
(let $12 (DqPhyStage '() (lambda '() (block '(
  (let $43 (YtReadTable! world $1 '((YtSection '((YtPath $6 $7 (Void) (Void))) '()))))
  (let $44 (lambda '($48 $49) $48 $49))
  (let $45 (lambda '($50 $51 $52 $53) $50 $51))
  (let $46 (lambda '($54 $55 $56 $57 $58 $59) $58 $59))
  (let $47 (lambda '($60 $61 $62 $63) $62 $63))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (DqReadWideWrap $43 '()))) '-1073741824 $44 $45 $46 $47))
))) $11))
(let $13 (DqCnHashShuffle (TDqOutput $12 '0) '('0 '1) '0 '"HashV2"))
(let $14 (lambda '($71 $72) (AsStruct '('"value" $71) '('"value_utf" $72))))
(let $15 '('Auto 'Many))
(let $16 (Bool 'true))
(let $17 '('('"_logical_id" '2039) '('"_id" '"a062861f-72dcbbfd-3e88a144-3121e530") $10))
(let $18 (DqPhyStage '($13) (lambda '($64) (block '(
  (let $65 (NarrowSqueezeToDict (ToFlow (WideFromBlocks $64)) (lambda '($69 $70) '($69 $70)) $14 $15))
  (let $66 (Condense1 (OrderedFlatMap $65 (lambda '($73) (OrderedFlatMap (DictPayloads $73) (lambda '($74) $74)))) (lambda '($75) $75) (lambda '($76 $77) (Or (AggrNotEquals (Member $76 '"value") (Member $77 '"value")) (AggrNotEquals (Member $76 '"value_utf") (Member $77 '"value_utf")))) (lambda '($78 $79) $79)))
  (let $67 (Sort $66 $16 (lambda '($80) (Member $80 '"value"))))
  (let $68 (lambda '($81) (Member $81 '"value") (Member $81 '"value_utf")))
  (return (FromFlow (ExpandMap $67 $68)))
))) $17))
(let $19 '('('0 '"Asc")))
(let $20 (DqCnMerge (TDqOutput $18 '0) $19))
(let $21 (DqPhyStage '($20) (lambda '($82) (FromFlow (NarrowMap (ToFlow $82) $14))) '('('"_logical_id" '2051) '('"_id" '"19121ae1-ce3ed932-78593d29-6789729c"))))
(let $22 '($12 $18 $21))
(let $23 (DqCnResult (TDqOutput $21 '0) $7))
(let $24 '('('"type" '"generic")))
(let $25 (KqpPhysicalTx $22 '($23) '() $24))
(let $26 '('"value"))
(let $27 (lambda '($84) $84))
(let $28 (StructType $8))
(let $29 '('"_wide_channels" $28))
(let $30 '('('"_logical_id" '2143) '('"_id" '"5fb3a06c-8391fb5-ab95df94-ec666005") $29))
(let $31 (DqPhyStage '() (lambda '() (block '(
  (let $83 (YtReadTable! world $1 '((YtSection '((YtPath $6 $26 (Void) (Void))) '()))))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (DqReadWideWrap $83 '()))) '-1073741824 $27 (lambda '($85 $86) $85) (lambda '($87 $88 $89) $89) (lambda '($90 $91) $91)))
))) $30))
(let $32 (DqCnHashShuffle (TDqOutput $31 '0) '('0) '0 '"HashV2"))
(let $33 (lambda '($96) (AsStruct '('"value" $96))))
(let $34 '('('"_logical_id" '2384) '('"_id" '"adaaffde-dae81c55-b217de6d-5d732217") $29))
(let $35 (DqPhyStage '($32) (lambda '($92) (block '(
  (let $93 (NarrowSqueezeToDict (ToFlow (WideFromBlocks $92)) $27 $33 $15))
  (let $94 (Condense1 (OrderedFlatMap $93 (lambda '($97) (OrderedFlatMap (DictPayloads $97) (lambda '($98) $98)))) (lambda '($99) (Member $99 '"value")) (lambda '($100 $101) (AggrNotEquals (Member $100 '"value") $101)) (lambda '($102 $103) $103)))
  (let $95 (Sort (Map $94 $33) $16 (lambda '($104) (Member $104 '"value"))))
  (return (FromFlow (ExpandMap $95 (lambda '($105) (Member $105 '"value")))))
))) $34))
(let $36 (DqCnMerge (TDqOutput $35 '0) $19))
(let $37 (DqPhyStage '($36) (lambda '($106) (FromFlow (NarrowMap (ToFlow $106) $33))) '('('"_logical_id" '2396) '('"_id" '"959d2935-7eb2913a-1283784b-12294565"))))
(let $38 '($31 $35 $37))
(let $39 (DqCnResult (TDqOutput $37 '0) $26))
(let $40 (KqpPhysicalTx $38 '($39) '() $24))
(let $41 (KqpTxResultBinding (ListType $9) '0 '0))
(let $42 (KqpTxResultBinding (ListType $28) '1 '0))
(return (KqpPhysicalQuery '($25 $40) '($41 $42) '('('"type" '"query"))))
)
