(
(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 'Int32)))
(let $8 (Bool 'false))
(let $9 (lambda '($40 $41) $40 $41))
(let $10 (DataType 'String))
(let $11 '('"_wide_channels" (StructType '('"key" $10) '('"subkey" $10))))
(let $12 '('('"_logical_id" '1763) '('"_id" '"60cc090b-aa9b18e1-72be8965-7c547272") $11))
(let $13 (DqPhyStage '() (lambda '() (block '(
  (let $34 (YtReadTable! world $1 '((YtSection '((YtPath $6 '('"key" '"subkey") (Void) (Void))) '()))))
  (let $35 (lambda '($42 $43 $44 $45) $42 $43))
  (let $36 (lambda '($46 $47 $48 $49 $50 $51) $50 $51))
  (let $37 (lambda '($52 $53 $54 $55) $54 $55))
  (return (DqPhyHashCombine (WideToBlocks (FromFlow (WideFilter (DqReadWideWrap $34 '()) (lambda '($38 $39) (Coalesce (> (SafeCast $38 $7) (Int32 '100)) $8))))) '-1073741824 $9 $35 $36 $37))
))) $12))
(let $14 (DqCnHashShuffle (TDqOutput $13 '0) '('0 '1) '0 '"HashV2"))
(let $15 (Uint64 '100))
(let $16 (Bool 'true))
(let $17 '('0 $16))
(let $18 '('('"_logical_id" '2095) '('"_id" '"b99898d-e345c5e4-3cb0734e-cbf46c26") $11))
(let $19 (DqPhyStage '($14) (lambda '($56) (block '(
  (let $57 (lambda '($59 $60 $61 $62)))
  (let $58 (WideCombiner (ToFlow (WideFromBlocks $56)) '"" $9 $57 $57 $9))
  (return (FromFlow (WideTopSort $58 $15 '($17))))
))) $18))
(let $20 '('0 '"Asc"))
(let $21 (DqCnMerge (TDqOutput $19 '0) '($20)))
(let $22 '('('"_logical_id" '2108) '('"_id" '"2454b60d-c2a6c7a3-284f87f9-b6edbeb2") $11))
(let $23 (DqPhyStage '($21) (lambda '($63) (FromFlow (Take (ToFlow $63) $15))) $22))
(let $24 (DqCnBroadcast (TDqOutput $23 '0)))
(let $25 (OptionalType $10))
(let $26 (StructType '('"a.key" $25) '('"a.subkey" $25) '('"b.key" $10) '('"b.value" $10)))
(let $27 '('('"_logical_id" '2237) '('"_id" '"104ed674-b9d36f02-47d9d58f-c369c687") '('"_wide_channels" $26)))
(let $28 (DqPhyStage '($24) (lambda '($64) (block '(
  (let $65 '('Many 'Hashed 'Compact))
  (let $66 (NarrowSqueezeToDict (ToFlow $64) (lambda '($68 $69) $68) (lambda '($70 $71) (AsStruct '('"key" $70) '('"subkey" $71))) $65))
  (let $67 '($17 '('1 $16) '('3 $16)))
  (return (FromFlow (WideSort (FlatMap $66 (lambda '($72) (block '(
    (let $73 (YtReadTable! world $1 '((YtSection '((YtPath $6 '('"key" '"value") (Void) (Void))) '()))))
    (let $74 '('0 '2 '1 '3))
    (let $75 '('"key" '0 '"subkey" '1))
    (return (MapJoinCore (WideFilter (DqReadWideWrap $73 '()) (lambda '($76 $77) (Coalesce (< (SafeCast $76 $7) (Int32 '"500")) $8))) $72 '"Left" '('0) '('"key") $74 $75 '('"a.key") '('"b.key")))
  )))) $67)))
))) $27))
(let $29 '($20 '('1 '"Asc") '('3 '"Asc")))
(let $30 (DqCnMerge (TDqOutput $28 '0) $29))
(let $31 (DqPhyStage '($30) (lambda '($78) (FromFlow (NarrowMap (ToFlow $78) (lambda '($79 $80 $81 $82) (AsStruct '('"a.key" $79) '('"a.subkey" $80) '('"b.key" $81) '('"b.value" $82)))))) '('('"_logical_id" '2249) '('"_id" '"3aab50bd-8dfa875c-baa61d04-c8fd2821"))))
(let $32 '($13 $19 $23 $28 $31))
(let $33 (DqCnResult (TDqOutput $31 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx $32 '($33) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $26) '0 '0)) '('('"type" '"query"))))
)
