(
(let $1 (DataSource '"yt" '"/Root/plato"))
(let $2 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
(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 '"14") '('DataSize '"614") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
(let $6 (YtTable '"Input" $3 $4 $5 '() (Void) (Void) '"/Root/plato"))
(let $7 (OptionalType (DataType 'Uint32)))
(let $8 (Int32 '"10"))
(let $9 (lambda '($39 $40) $40 $39))
(let $10 (DataType 'String))
(let $11 (DataType 'Int32))
(let $12 (OptionalType $11))
(let $13 '('('"_logical_id" '3271) '('"_id" '"2679425d-b7b26ae2-3e7bf3d6-b55d1255") '('"_wide_channels" (StructType '('_yql_agg_0 (ListType $10)) '('mod $12)))))
(let $14 (DqPhyStage '() (lambda '() (block '(
  (let $29 (YtReadTable! world $1 '((YtSection '((YtPath $6 '('"key" '"value") (Void) (Void))) '()))))
  (return (WideFromBlocks (DqPhyHashCombine (WideToBlocks (FromFlow (DqReadWideWrap $29 '()))) '-1073741824 (lambda '($30 $31) (% (SafeCast $30 $7) $8)) (lambda '($32 $33 $34) (AsList $34)) (lambda '($35 $36 $37 $38) (Insert $38 $37)) $9)))
))) $13))
(let $15 '"_equijoin_column_0")
(let $16 (StructType '($15 $12) '('"key" $10)))
(let $17 '('('"_logical_id" '3221) '('"_id" '"af17aa86-a3495114-b0766196-8aa22971") '('"_wide_channels" $16)))
(let $18 (DqPhyStage '() (lambda '() (block '(
  (let $41 (YtReadTable! world $1 '((YtSection '((YtPath $6 '('"key") (Void) (Void))) '()))))
  (let $42 (lambda '($43) (% (/ (SafeCast $43 $7) $8) $8) $43))
  (return (FromFlow (WideMap (DqReadWideWrap $41 '()) $42)))
))) $17))
(let $19 (DqCnHashShuffle (TDqOutput $14 '0) '('1) '0 '"HashV2"))
(let $20 (DqCnBroadcast (TDqOutput $18 '0)))
(let $21 (StructType '('"d.lv" $10) '('"d.mod" $12) '('"j.key" $10)))
(let $22 '('('"_logical_id" '3982) '('"_id" '"f9df2848-8e095805-facf806a-b50a6fd3") '('"_wide_channels" $21)))
(let $23 (DqPhyStage '($19 $20) (lambda '($44 $45) (block '(
  (let $46 '('Many 'Hashed 'Compact))
  (let $47 (SqueezeToDict (NarrowFlatMap (WideFilter (ToFlow $45) (lambda '($51 $52) (Exists $51))) (lambda '($53 $54) (IfPresent $53 (lambda '($55) (Just '($55 (AsStruct '($15 $53) '('"key" $54))))) (Nothing (OptionalType (TupleType $11 $16)))))) (lambda '($56) (Nth $56 '0)) (lambda '($57) (Nth $57 '1)) $46))
  (let $48 (Bool 'true))
  (let $49 (Sort (FlatMap $47 (lambda '($58) (block '(
    (let $59 (WideCombiner (ToFlow $44) '"" (lambda '($61 $62) $62) (lambda '($63 $64 $65) $64) (lambda '($66 $67 $68 $69) (Extend $67 $69)) $9))
    (let $60 '('lv '"d.lv" 'mod '"d.mod"))
    (return (MapJoinCore (OrderedFilter (NarrowFlatMap $59 (lambda '($70 $71) (OrderedMap (Collect $70) (lambda '($72) (AsStruct '('lv $72) '('mod $71)))))) (lambda '($73) (Exists (Member $73 'mod)))) $58 'Inner '('mod) '($15) $60 '('"key" '"j.key") '('"d.mod") '('"j._equijoin_column_0")))
  )))) '($48 $48) (lambda '($74) '((Member $74 '"d.mod") (Member $74 '"d.lv")))))
  (let $50 (lambda '($75) (Member $75 '"d.lv") (Member $75 '"d.mod") (Member $75 '"j.key")))
  (return (FromFlow (ExpandMap $49 $50)))
))) $22))
(let $24 (DqCnMerge (TDqOutput $23 '0) '('('1 '"Asc") '('0 '"Asc"))))
(let $25 (DqPhyStage '($24) (lambda '($76) (FromFlow (NarrowMap (ToFlow $76) (lambda '($77 $78 $79) (AsStruct '('"d.lv" $77) '('"d.mod" $78) '('"j.key" $79)))))) '('('"_logical_id" '3994) '('"_id" '"8fc33a04-2ad937a3-4779e5ad-fcfbe926"))))
(let $26 '($14 $18 $23 $25))
(let $27 '('"d.mod" '"d.lv" '"j.key"))
(let $28 (DqCnResult (TDqOutput $25 '0) $27))
(return (KqpPhysicalQuery '((KqpPhysicalTx $26 '($28) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $21) '0 '0)) '('('"type" '"query"))))
)
