final class Histograms
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.

Checks the histogram request of ANALYZE TABLE against the table it names.

Rule: MYSQL-HISTOGRAM-001. A histogram request applies to exactly one table; more than one is HistogramTables. A column name the table's complete shape does not hold, compared under the context's column name comparison, is UnknownHistogramColumn; an open shape (an undeclared table or incomplete members) reports nothing. A bucket count outside 1 to 1024 (MAX_NUMBER_OF_HISTOGRAM_BUCKETS) is BucketCountOutOfRange. Terminates: one pass over the columns and the slots. Source: https://dev.mysql.com/doc/refman/8.4/en/analyze-table.html, https://dev.mysql.com/doc/refman/8.4/en/optimizer-statistics.html. Status: Implemented.

Methods§

public function derive(
    Derivation $derivation,
    Histogram $histogram,
    list<RelationFact> $tables,
): void

Reports the problems of a histogram request.

Parameters

$derivationDerivation
$histogramHistogram
$tableslist<RelationFact>The facts of the tables the statement names, in order
Called from 1
Calls 7
public function buckets(Numeral $buckets): bool

Tells whether a bucket count is within 1 to 1024.

Parameters

$bucketsNumeral

Returns

bool
Test cases 1
Called from 1
Calls 3

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 4
Method calls 4