Skip to main content

Module value_counts

Module value_counts 

Source
Expand description

Value counts: how many rows of the view hold each value of one column, and a summary of the column, from one read of that column.

The count is exact: one streamed pass over the column that keeps a count per value and no rows (crate::chart::chart_data::Tally). A view too large to count at once, where the sampler can read part of it (one Parquet or IPC file, read a few row groups at a time), is sampled first instead and says so; counting every row is then the user’s call. Where the sampler would stream every row anyway, the exact count is the same read and is what runs.

Structs§

Line
One line of the listing: what it stands for, its rows, and the rows of it and every line above it.
Plan
A count to run off the UI thread: the view, the column, and how to read it.
Summary
The header strip: what can be said of the column from its counts alone.
ValueCounts
A column’s values counted: every distinct value with its rows, the summary, and the listing in either order.

Enums§

LineKind
What one line of the listing stands for.
Number
A number the summary adds up: whole for integer columns, so a large sum keeps every digit.
Order
Which way the values are listed.
Read
How a count reads the view.

Constants§

HISTOGRAM_BINS
Bins of the histogram view. An integer column spanning fewer values than this takes a bin per value instead.
LARGE_SAMPLES
A local view this many times the sample size is sampled first, where a sample reads less of it: 10,000,000 rows at the default sample size.
MAX_DISTINCT
Distinct values a count keeps before it stops: past this the column is an identifier, and the counts would grow with the table.
TOP_N
Values listed one per line; the rest are summed into one other line.