Files
greptimedb/promql/map/index.html
T

15 lines
12 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Pointwise kernels for evaluated series, independent of planning and execution nodes."><title>promql::map - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-1ed95124.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="promql" data-themes="" data-resource-suffix="" data-rustdoc-version="1.98.1 (48a229cea 2026-09-01)" data-channel="1.98.1" data-search-js="search-9944d736.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../static.files/storage-41dd4d93.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-417ebf0a.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module map</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../promql/index.html">promql</a><span class="version">1.4.0-alpha.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module map</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate promql</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">promql</a></div><h1>Module <span>map</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/promql/map.rs.html#15-591">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Pointwise kernels for evaluated series, independent of planning and execution nodes.</p>
<p>Expression column naming and omission of missing points belong to the planner/output adapter;
these kernels retain the shared field schema and represent missing grid positions by validity.</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="broadcast/index.html" title="mod promql::map::broadcast">broadcast</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="mod" href="comparison/index.html" title="mod promql::map::comparison">comparison</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.ArithmeticOp.html" title="enum promql::map::ArithmeticOp">Arithmetic<wbr>Op</a></dt><dd>Float arithmetic between a vector and a scalar, as in Prometheus.</dd><dt><a class="enum" href="enum.Comparison.html" title="enum promql::map::Comparison">Comparison</a></dt><dd>Filter keeps the vector value and labels; bool emits 0/1 and drops the metric name.</dd><dt><a class="enum" href="enum.ComparisonOp.html" title="enum promql::map::ComparisonOp">Comparison<wbr>Op</a></dt><dd>IEEE comparisons: NaN only satisfies <code>NotEqual</code>, and signed zeros compare equal.</dd><dt><a class="enum" href="enum.MathOp.html" title="enum promql::map::MathOp">MathOp</a></dt><dd>Float math supported by the evaluated-series kernel.</dd><dt><a class="enum" href="enum.ParameterizedMath.html" title="enum promql::map::ParameterizedMath">Parameterized<wbr>Math</a></dt><dd>A math function whose parameters are time-varying scalars. For <code>max_of</code> and <code>min_of</code> the
mapped series is the first scalar operand.</dd><dt><a class="enum" href="enum.ScalarOperand.html" title="enum promql::map::ScalarOperand">Scalar<wbr>Operand</a></dt><dd>The scalar’s position in a binary expression; noncommutative operators retain this order.</dd><dt><a class="enum" href="enum.ScalarSeriesOperand.html" title="enum promql::map::ScalarSeriesOperand">Scalar<wbr>Series<wbr>Operand</a></dt><dd>A time-varying, unlabelled single-field scalar, with explicit operand direction.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.constant_series.html" title="fn promql::map::constant_series">constant_<wbr>series</a></dt><dd>An unlabelled constant over exactly <code>range</code>; the schema must have one field.</dd><dt><a class="fn" href="fn.drop_empty_labels.html" title="fn promql::map::drop_empty_labels">drop_<wbr>empty_<wbr>labels</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Drops labels with empty values, which Prometheus treats as absent.</dd><dt><a class="fn" href="fn.drop_metric_name.html" title="fn promql::map::drop_metric_name">drop_<wbr>metric_<wbr>name</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Drops <code>__name__</code>, <code>__type__</code> and <code>__unit__</code>, as Prometheus <code>DropReserved(schema.IsMetadataLabel)</code>
does. Empty values are dropped too: Prometheus has no empty labels, and keeping them would hide
a same-labelset collision from the caller.</dd><dt><a class="fn" href="fn.float_sample.html" title="fn promql::map::float_sample">float_<wbr>sample</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>A sample of a series accepted by <a href="fn.validate_float_series.html" title="fn promql::map::validate_float_series"><code>validate_float_series</code></a>.</dd><dt><a class="fn" href="fn.go_max.html" title="fn promql::map::go_max">go_max</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Go <code>math.Max</code>: +Inf wins over NaN, and +0 over -0.</dd><dt><a class="fn" href="fn.go_min.html" title="fn promql::map::go_min">go_min</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Go <code>math.Min</code>: -Inf wins over NaN, and -0 over +0.</dd><dt><a class="fn" href="fn.is_float_series.html" title="fn promql::map::is_float_series">is_<wbr>float_<wbr>series</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.map_arithmetic.html" title="fn promql::map::map_arithmetic">map_<wbr>arithmetic</a></dt><dd>Applies arithmetic against a constant scalar to every field and drops the metric name.</dd><dt><a class="fn" href="fn.map_arithmetic_literal.html" title="fn promql::map::map_arithmetic_literal">map_<wbr>arithmetic_<wbr>literal</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Applies literal scalar arithmetic to float and histogram samples. Histograms support only
<code>h * s</code>, <code>s * h</code> and <code>h / s</code>; under any other operator (<code>2 / h</code>, <code>h + 1</code>) the sample is dropped,
as in Prometheus, and the second element reports that one was.</dd><dt><a class="fn" href="fn.map_arithmetic_segment.html" title="fn promql::map::map_arithmetic_segment">map_<wbr>arithmetic_<wbr>segment</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.map_arithmetic_series.html" title="fn promql::map::map_arithmetic_series">map_<wbr>arithmetic_<wbr>series</a></dt><dd>Applies arithmetic between vector fields and a time-varying scalar on the same grid, and drops
the metric name.</dd><dt><a class="fn" href="fn.map_compare_literal.html" title="fn promql::map::map_compare_literal">map_<wbr>compare_<wbr>literal</a></dt><dd>Compares a vector with a constant scalar. Returns <code>None</code> when no sample passed, and whether a
histogram sample was dropped.</dd><dt><a class="fn" href="fn.map_compare_series.html" title="fn promql::map::map_compare_series">map_<wbr>compare_<wbr>series</a></dt><dd>Compares against a time-varying scalar. Filter keeps vector values and labels; bool emits
0/1 and drops the metric name.</dd><dt><a class="fn" href="fn.map_float_fields.html" title="fn promql::map::map_float_fields">map_<wbr>float_<wbr>fields</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.map_float_segment.html" title="fn promql::map::map_float_segment">map_<wbr>float_<wbr>segment</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.map_math.html" title="fn promql::map::map_math">map_<wbr>math</a></dt><dd>Applies float math to every field of one evaluated series and drops the metric name, like
Prometheus’ <code>simpleFloatFunc</code>.</dd><dt><a class="fn" href="fn.map_math_with_parameters.html" title="fn promql::map::map_math_with_parameters">map_<wbr>math_<wbr>with_<wbr>parameters</a></dt><dd>Applies <code>function</code> to every float field with parameters read per point, and drops the metric
name, like <a href="fn.map_math.html" title="fn promql::map::map_math"><code>crate::map::map_math</code></a> with constant parameters; histogram samples are skipped.</dd><dt><a class="fn" href="fn.map_pi.html" title="fn promql::map::map_pi">map_pi</a></dt><dd><code>pi()</code> over <code>range</code>.</dd><dt><a class="fn" href="fn.map_samples.html" title="fn promql::map::map_samples">map_<wbr>samples</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.rebuild_labels.html" title="fn promql::map::rebuild_labels">rebuild_<wbr>labels</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.series_error.html" title="fn promql::map::series_error">series_<wbr>error</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.validate_float_series.html" title="fn promql::map::validate_float_series">validate_<wbr>float_<wbr>series</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Checks <code>series</code> against <code>schema</code> and its grid, and rejects any non-float sample. Returns the
axis, which may skip positions, so callers traverse it rather than assume a contiguous range.</dd><dt><a class="fn" href="fn.validate_grid_series.html" title="fn promql::map::validate_grid_series">validate_<wbr>grid_<wbr>series</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Checks <code>series</code> against <code>schema</code> and its evaluation grid, whatever its sample types.</dd></dl></section></div></main></body></html>