(
(let $1 (DataType 'String))
(let $2 (StructType '('"key" $1) '('"subkey" $1) '('"value" $1)))
(let $3 '('('"_logical_id" '928) '('"_id" '"73bb1ff5-b5e80015-c9a46551-fdebb34f") '('"_wide_channels" $2)))
(let $4 (DqPhyStage '() (lambda '() (block '(
  (let $8 '@@["StructType";[["key";["DataType";"String"]];["subkey";["DataType";"String"]];["value";["DataType";"String"]]]]@@)
  (let $9 (YqlRowSpec '('NativeYtTypeFlags '0) '('StrictSchema '1) '('UniqueKeys '0) '('Type $8)))
  (let $10 (YtMeta '('CanWrite '1) '('DoesExist '1) '('YqlCompatibleScheme '1) '('InferredScheme '0) '('IsDynamic '0) '('Attrs '('('"native_strict_schema" '"false")))))
  (let $11 (YtStat '('Id '"Input") '('RecordsCount '"10") '('DataSize '"420") '('ChunkCount '1) '('ModifyTime '0) '('Revision '0)))
  (let $12 (YtTable '"Input" $9 $10 $11 '() (Void) (Void) '"/Root/plato"))
  (let $13 '('"key" '"subkey" '"value"))
  (let $14 (YtReadTable! world (DataSource '"yt" '"/Root/plato") '((YtSection '((YtPath $12 $13 (Void) (Void))) '()))))
  (return (FromFlow (WideSort (WideFilter (DqReadWideWrap $14 '()) (lambda '($15 $16 $17) (block '(
    (let $18 (Double '100))
    (let $19 (* (Double '"0.5") $18))
    (let $20 (Ensure $19 (>= $19 (Double '0)) (String '"Expected sampling rate to be nonnegative")))
    (let $21 (Ensure $20 (<= $20 $18) (String '"Sampling rate is over 100%")))
    (return (< (Random (DependsOn (AsStruct '('"key" $15) '('"subkey" $16) '('"value" $17)))) (/ $21 $18)))
  )))) '('('0 (Bool 'true))))))
))) $3))
(let $5 (DqCnMerge (TDqOutput $4 '0) '('('0 '"Asc"))))
(let $6 (DqPhyStage '($5) (lambda '($22) (FromFlow (NarrowMap (ToFlow $22) (lambda '($23 $24 $25) (AsStruct '('"key" $23) '('"subkey" $24) '('"value" $25)))))) '('('"_logical_id" '940) '('"_id" '"3edac4eb-64b40de1-df4e1750-cbb508e2"))))
(let $7 (DqCnResult (TDqOutput $6 '0) '()))
(return (KqpPhysicalQuery '((KqpPhysicalTx '($4 $6) '($7) '() '('('"type" '"generic")))) '((KqpTxResultBinding (ListType $2) '0 '0)) '('('"type" '"query"))))
)
