Files
greptimedb/mito2/read/scan_util/index.html
2026-05-15 04:01:35 +00:00

7 lines
9.9 KiB
HTML

<!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="Utilities for scanners."><title>mito2::read::scan_util - 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-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="mito2" data-themes="" data-resource-suffix="" data-rustdoc-version="1.96.0-nightly (ac7f9ec7d 2026-03-20)" data-channel="nightly" data-search-js="search-63369b7b.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-5013f961.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 scan_util</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../mito2/index.html">mito2</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module scan_<wbr>util</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In mito2::<wbr>read</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">mito2</a>::<wbr><a href="../index.html">read</a></div><h1>Module <span>scan_<wbr>util</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/mito2/read/scan_util.rs.html#15-1952">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Utilities for scanners.</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.CompareCostReverse.html" title="struct mito2::read::scan_util::CompareCostReverse">Compare<wbr>Cost<wbr>Reverse</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Wrapper for file metrics that compares by total cost in reverse order.
This allows using BinaryHeap as a min-heap for efficient top-K selection.</dd><dt><a class="struct" href="struct.FileScanMetrics.html" title="struct mito2::read::scan_util::FileScanMetrics">File<wbr>Scan<wbr>Metrics</a></dt><dd>Per-file scan metrics.</dd><dt><a class="struct" href="struct.PartitionMetrics.html" title="struct mito2::read::scan_util::PartitionMetrics">Partition<wbr>Metrics</a></dt><dd>Metrics while reading a partition.</dd><dt><a class="struct" href="struct.PartitionMetricsInner.html" title="struct mito2::read::scan_util::PartitionMetricsInner">Partition<wbr>Metrics<wbr>Inner</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="struct" href="struct.PartitionMetricsList.html" title="struct mito2::read::scan_util::PartitionMetricsList">Partition<wbr>Metrics<wbr>List</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>List of PartitionMetrics.</dd><dt><a class="struct" href="struct.ScanMetricsSet.html" title="struct mito2::read::scan_util::ScanMetricsSet">Scan<wbr>Metrics<wbr>Set</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Verbose scan metrics for a partition.</dd><dt><a class="struct" href="struct.SeriesDistributorMetrics.html" title="struct mito2::read::scan_util::SeriesDistributorMetrics">Series<wbr>Distributor<wbr>Metrics</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Metrics for the series distributor.</dd><dt><a class="struct" href="struct.SplitRecordBatchStream.html" title="struct mito2::read::scan_util::SplitRecordBatchStream">Split<wbr>Record<wbr>Batch<wbr>Stream</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>A stream wrapper that splits record batches from an inner stream.</dd></dl><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.BATCH_SIZE_THRESHOLD.html" title="constant mito2::read::scan_util::BATCH_SIZE_THRESHOLD">BATCH_<wbr>SIZE_<wbr>THRESHOLD</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Minimum batch size after splitting. The batch size is less than 60 because a series may only have
60 samples per hour.</dd><dt><a class="constant" href="constant.NUM_SERIES_THRESHOLD.html" title="constant mito2::read::scan_util::NUM_SERIES_THRESHOLD">NUM_<wbr>SERIES_<wbr>THRESHOLD</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Number of series threshold for splitting batches.</dd><dt><a class="constant" href="constant.SPLIT_ROW_THRESHOLD.html" title="constant mito2::read::scan_util::SPLIT_ROW_THRESHOLD">SPLIT_<wbr>ROW_<wbr>THRESHOLD</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Files with row count greater than this threshold can contribute to the estimation.</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.build_flat_file_range_scan_stream.html" title="fn mito2::read::scan_util::build_flat_file_range_scan_stream">build_<wbr>flat_<wbr>file_<wbr>range_<wbr>scan_<wbr>stream</a></dt><dd>Build the stream of scanning the input <a href="../../sst/parquet/file_range/struct.FileRange.html" title="struct mito2::sst::parquet::file_range::FileRange"><code>FileRange</code></a>s using flat reader that returns RecordBatch.</dd><dt><a class="fn" href="fn.can_split_series.html" title="fn mito2::read::scan_util::can_split_series">can_<wbr>split_<wbr>series</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.compute_average_batch_size.html" title="fn mito2::read::scan_util::compute_average_batch_size">compute_<wbr>average_<wbr>batch_<wbr>size</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Computes the average estimated rows per batch across multiple range readers.</dd><dt><a class="fn" href="fn.compute_parallel_channel_size.html" title="fn mito2::read::scan_util::compute_parallel_channel_size">compute_<wbr>parallel_<wbr>channel_<wbr>size</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Computes the channel size for parallel scan based on the estimated rows per batch.
The channel should buffer approximately <code>2 * DEFAULT_READ_BATCH_SIZE</code> rows.</dd><dt><a class="fn" href="fn.maybe_scan_flat_other_ranges.html" title="fn mito2::read::scan_util::maybe_scan_flat_other_ranges">maybe_<wbr>scan_<wbr>flat_<wbr>other_<wbr>ranges</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.new_filter_metrics.html" title="fn mito2::read::scan_util::new_filter_metrics">new_<wbr>filter_<wbr>metrics</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Creates a new <a href="../../sst/parquet/reader/struct.ReaderFilterMetrics.html" title="struct mito2::sst::parquet::reader::ReaderFilterMetrics">ReaderFilterMetrics</a> with optional apply metrics initialized
based on the <code>explain_verbose</code> flag.</dd><dt><a class="fn" href="fn.scan_flat_file_ranges.html" title="fn mito2::read::scan_util::scan_flat_file_ranges">scan_<wbr>flat_<wbr>file_<wbr>ranges</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Scans file ranges at <code>index</code> using flat reader that returns RecordBatch.</dd><dt><a class="fn" href="fn.scan_flat_mem_ranges.html" title="fn mito2::read::scan_util::scan_flat_mem_ranges">scan_<wbr>flat_<wbr>mem_<wbr>ranges</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Scans memtable ranges at <code>index</code> using flat format that returns RecordBatch.</dd><dt><a class="fn" href="fn.should_split_flat_batches_for_merge.html" title="fn mito2::read::scan_util::should_split_flat_batches_for_merge">should_<wbr>split_<wbr>flat_<wbr>batches_<wbr>for_<wbr>merge</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Returns the estimated rows per batch after splitting if splitting flat record batches
may improve merge performance. Returns <code>None</code> if splitting is not beneficial.</dd><dt><a class="fn" href="fn.split_record_batch.html" title="fn mito2::read::scan_util::split_record_batch">split_<wbr>record_<wbr>batch</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Splits the batch by timestamps.</dd></dl></section></div></main></body></html>