STRUCTSEALEDAssembly: Parquet.SourceGenerator.Attributes

ParquetColumnStatistics

Namespace: Parquet.SourceGenerator

The <c>min_value</c> / <c>max_value</c> / <c>null_count</c> zone map a Parquet writer records for one column chunk, projected onto the CLR type of the generated model property (issue #149).

Inheritance:
object
System.ValueType
Parquet.SourceGenerator.ParquetColumnStatistics<T>

Syntax

ParquetColumnStatistics<T>

Implements

System.IEquatable<Parquet.SourceGenerator.ParquetColumnStatistics<T>>

UML Class Diagram

ParquetColumnStatistics Class Diagram

Rendering diagram...

Remarks

<para> Statistics are advisory: a writer may omit them, and a file produced by another engine may record them in a physical type this projection cannot map. Both cases surface as <see cref="HasMinMax"/> being <see langword="false"/>, and the generated readers never prune a row group whose statistics are incomplete. </para> <para> Prefer the <c>May*</c> helpers over raw <see cref="Min"/> / <see cref="Max"/> in a pruning predicate: they answer "could this row group contain a matching row?", and answer <see langword="true"/> whenever statistics are missing, so a predicate built from them can never prune away real data. </para> <para> Ordering uses <see cref="Comparer{T}.Default"/>, except for <see cref="string"/>, which uses <see cref="StringComparer.Ordinal"/>. Parquet orders binary columns by unsigned UTF-8 bytes; an ordinal UTF-16 comparison agrees with that across all of ASCII and disagrees only where surrogate pairs meet the U+E000..U+FFFF range. </para>

Constructors1

ParquetColumnStatistics
ParquetColumnStatistics<T>.ParquetColumnStatistics(bool hasMin, T min, bool hasMax, T max, long? nullCount, long? distinctCount)

Creates a projected column-chunk zone map.

Parameters:
  • hasMin(bool)— Whether <paramref name="min"/> carries a recorded minimum.
  • min(T)— The chunk minimum, when <paramref name="hasMin"/> is set.
  • hasMax(bool)— Whether <paramref name="max"/> carries a recorded maximum.
  • max(T)— The chunk maximum, when <paramref name="hasMax"/> is set.
  • nullCount(long?)— The chunk's recorded null count, when present.
  • distinctCount(long?)— The chunk's recorded distinct count, when present.

Properties6

DistinctCount: long?
long? ParquetColumnStatistics<T>.DistinctCount

The chunk's recorded distinct count, when the writer stored one.

HasMinMax: bool
bool ParquetColumnStatistics<T>.HasMinMax

Whether the chunk recorded both a minimum and a maximum this projection could map.

IsKnownNonNull: bool
bool ParquetColumnStatistics<T>.IsKnownNonNull

Whether the chunk is known to hold no nulls at all.

Max: T?
T? ParquetColumnStatistics<T>.Max

The recorded maximum, or <c>default</c> when <see cref="HasMinMax"/> is false.

Min: T?
T? ParquetColumnStatistics<T>.Min

The recorded minimum, or <c>default</c> when <see cref="HasMinMax"/> is false.

NullCount: long?
long? ParquetColumnStatistics<T>.NullCount

The chunk's recorded null count, when the writer stored one.

Methods10

Equals: bool
bool ParquetColumnStatistics<T>.Equals(ParquetColumnStatistics<T> other)
Parameters:
  • other(Parquet.SourceGenerator.ParquetColumnStatistics<T>)
Equals: bool
bool ParquetColumnStatistics<T>.Equals(object? obj)
Parameters:
  • obj(object?)
GetHashCode: int
int ParquetColumnStatistics<T>.GetHashCode()
MayContain: bool
bool ParquetColumnStatistics<T>.MayContain(T value)

Could this chunk hold a value equal to <paramref name="value"/>? (<c>x == value</c>)

Parameters:
  • value(T)
MayContainAny: bool
bool ParquetColumnStatistics<T>.MayContainAny(params T[]? values)

Could this chunk hold any value from <paramref name="values"/>? (<c>IN (...)</c>)

Parameters:
  • values(T[]?)— The candidate values. A null or empty set is treated as "no match possible".
MayContainAtLeast: bool
bool ParquetColumnStatistics<T>.MayContainAtLeast(T threshold)

Could this chunk hold a value <c>&gt;= threshold</c>?

Parameters:
  • threshold(T)
MayContainAtMost: bool
bool ParquetColumnStatistics<T>.MayContainAtMost(T threshold)

Could this chunk hold a value <c>&lt;= threshold</c>?

Parameters:
  • threshold(T)
MayContainBetween: bool
bool ParquetColumnStatistics<T>.MayContainBetween(T low, T high)

Could this chunk hold a value in the inclusive range <c>[low, high]</c>?

Parameters:
  • low(T)
  • high(T)
MayContainGreaterThan: bool
bool ParquetColumnStatistics<T>.MayContainGreaterThan(T threshold)

Could this chunk hold a value <c>&gt; threshold</c>?

Parameters:
  • threshold(T)
MayContainLessThan: bool
bool ParquetColumnStatistics<T>.MayContainLessThan(T threshold)

Could this chunk hold a value <c>&lt; threshold</c>?

Parameters:
  • threshold(T)