(
(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 '4) '('DataSize '"166") '('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 '('"_logical_id" '2151))
(let $10 (DataType 'String))
(let $11 '('"key" $10))
(let $12 '('"subkey" $10))
(let $13 '('"value" $10))
(let $14 (StructType $11 $12 $13))
(let $15 '($9 '('"_id" '"c17aa9dc-dd7c1fcc-6eb24bee-8475ac84") '('"_wide_channels" $14)))
(let $16 (DqPhyStage '() (lambda '() (FromFlow $8)) $15))
(let $17 (OptionalType $10))
(let $18 '('"kk" $10))
(let $19 (OptionalType (DataType 'Int32)))
(let $20 (StructType '('"key" $17) $18 '('"subkey" $19) $13))
(let $21 '($9 '('"_id" '"56683625-a64cd403-37d7cc4-1679b72d") '('"_wide_channels" $20)))
(let $22 (DqPhyStage '() (lambda '() (block '(
  (let $32 (lambda '($40) (Member $40 '"key") (Member $40 '"kk") (Member $40 '"subkey") (Member $40 '"value")))
  (return (FromFlow (ExpandMap (NarrowFlatMap $8 (lambda '($33 $34 $35) (block '(
    (let $36 (OptionalType (DataType 'Uint32)))
    (let $37 (/ (SafeCast $33 $36) (Int32 '"100")))
    (let $38 (IfPresent $37 (lambda '($39) (Just (SafeCast $39 $10))) (Nothing $17)))
    (return (If (Coalesce (< $37 (Int32 '5)) (Bool 'false)) (Just (AsStruct '('"key" $38) '('"kk" $33) '('"subkey" (* (SafeCast $34 $36) (Int32 '"10"))) '('"value" (Concat (String '"data: ") $35)))) (Nothing (OptionalType $20))))
  )))) $32)))
))) $21))
(let $23 (DqCnMap (TDqOutput $16 '0)))
(let $24 (DqCnBroadcast (TDqOutput $22 '0)))
(let $25 (StructType $11 $18 $12 '('"subkeyFromD" $19) $13 '('"valueFromInput" $10)))
(let $26 '('('"_logical_id" '2382) '('"_id" '"4ef4299f-12be1122-796137fd-dffbb1ae") '('"_wide_channels" $25)))
(let $27 (DqPhyStage '($23 $24) (lambda '($41 $42) (block '(
  (let $43 '('Many 'Hashed 'Compact))
  (let $44 (SqueezeToDict (NarrowFlatMap (WideFilter (ToFlow $42) (lambda '($47 $48 $49 $50) (Exists $47))) (lambda '($51 $52 $53 $54) (IfPresent $51 (lambda '($55) (block '(
    (let $56 (AsStruct '('"key" $51) '('"kk" $52) '('"subkey" $53) '('"value" $54)))
    (return (Just '($55 $56)))
  ))) (Nothing (OptionalType (TupleType $10 $20)))))) (lambda '($57) (Nth $57 '0)) (lambda '($58) (Nth $58 '1)) $43))
  (let $45 (Bool 'true))
  (let $46 (lambda '($62 $63 $64 $65 $66 $67) $62 $65 $63 $66 $67 $64))
  (return (FromFlow (WideMap (WideSort (FlatMap $44 (lambda '($59) (block '(
    (let $60 '('0 '0 '1 '1 '2 '2))
    (let $61 '('"kk" '3 '"subkey" '4 '"value" '5))
    (return (MapJoinCore (ToFlow $41) $59 'Inner '('1) '('"key") $60 $61 '('"Input.subkey") '('"d.key")))
  )))) '('('0 $45) '('5 $45))) $46)))
))) $26))
(let $28 (DqCnMerge (TDqOutput $27 '0) '('('0 '"Asc") '('4 '"Asc"))))
(let $29 (DqPhyStage '($28) (lambda '($68) (FromFlow (NarrowMap (ToFlow $68) (lambda '($69 $70 $71 $72 $73 $74) (AsStruct '('"key" $69) '('"kk" $70) '('"subkey" $71) '('"subkeyFromD" $72) '('"value" $73) '('"valueFromInput" $74)))))) '('('"_logical_id" '2394) '('"_id" '"79a01406-9da58476-82fa896c-c25b7fe8"))))
(let $30 '($16 $22 $27 $29))
(let $31 (DqCnResult (TDqOutput $29 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx $30 '($31) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $25) '0 '0)) '('('"type" '"query"))))
)
