Files
greptimedb/servers/prom_row_builder/index.html
T

11 lines
6.3 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="Prometheus row-level helpers for converting proto `Rows` into Arrow `RecordBatch`es and aligning / normalizing their schemas against existing table schemas in the catalog."><title>servers::prom_row_builder - 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="servers" 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 prom_row_builder</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../servers/index.html">servers</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 prom_<wbr>row_<wbr>builder</a></h2><h3><a href="#functions">Module Items</a></h3><ul class="block"><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 servers</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">servers</a></div><h1>Module <span>prom_<wbr>row_<wbr>builder</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/servers/prom_row_builder.rs.html#15-767">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Prometheus row-level helpers for converting proto <code>Rows</code> into Arrow
<code>RecordBatch</code>es and aligning / normalizing their schemas against
existing table schemas in the catalog.</p>
</div></details><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.arrow_time_unit.html" title="fn servers::prom_row_builder::arrow_time_unit">arrow_<wbr>time_<wbr>unit</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Converts an arrow time unit to the common time unit.</dd><dt><a class="fn" href="fn.build_arrow_array.html" title="fn servers::prom_row_builder::build_arrow_array">build_<wbr>arrow_<wbr>array</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Build a single Arrow array for the given column index from proto <code>Rows</code>.</dd><dt><a class="fn" href="fn.build_prom_create_table_schema_from_proto.html" title="fn servers::prom_row_builder::build_prom_create_table_schema_from_proto">build_<wbr>prom_<wbr>create_<wbr>table_<wbr>schema_<wbr>from_<wbr>proto</a></dt><dd>Build a <code>Vec&lt;ColumnSchema&gt;</code> suitable for creating a new Prometheus logical table
directly from the proto <code>rows.schema</code>, avoiding the round-trip through Arrow schema.</dd><dt><a class="fn" href="fn.build_timestamp_array.html" title="fn servers::prom_row_builder::build_timestamp_array">build_<wbr>timestamp_<wbr>array</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Builds a timestamp array of <code>T</code>’s unit from a proto column, appending
each value directly into the builder. Values already in the target unit
are appended without conversion (the unchanged-unit fast path); others
are converted via <code>Timestamp::convert_to</code>, flooring on narrowing.</dd><dt><a class="fn" href="fn.identify_missing_columns_from_proto.html" title="fn servers::prom_row_builder::identify_missing_columns_from_proto">identify_<wbr>missing_<wbr>columns_<wbr>from_<wbr>proto</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Identify tag columns in the proto <code>rows_schema</code> that are absent from the
target region schema, without building an intermediate <code>RecordBatch</code>.</dd><dt><a class="fn" href="fn.rows_to_aligned_record_batch.html" title="fn servers::prom_row_builder::rows_to_aligned_record_batch">rows_<wbr>to_<wbr>aligned_<wbr>record_<wbr>batch</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Directly converts proto <code>Rows</code> into a <code>RecordBatch</code> aligned to the given
<code>target_schema</code>, handling Prometheus column renaming (timestamp/value),
reordering, type casting, and null-filling in a single pass.</dd><dt><a class="fn" href="fn.unzip_logical_region_schema.html" title="fn servers::prom_row_builder::unzip_logical_region_schema">unzip_<wbr>logical_<wbr>region_<wbr>schema</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Extract timestamp, field, and tag column names from a logical region schema.</dd></dl></section></div></main></body></html>