CLASSSEALEDAssembly: Parquet.SourceGenerator.Attributes

ParquetColumnAttribute

Namespace: Parquet.SourceGenerator

Controls column binding parameters such as field name override and ordering.

Inheritance:
object
System.Attribute
Parquet.SourceGenerator.ParquetColumnAttribute

Syntax

ParquetColumnAttribute

UML Class Diagram

ParquetColumnAttribute Class Diagram

Rendering diagram...

Constructors2

ParquetColumnAttribute
ParquetColumnAttribute.ParquetColumnAttribute()

Initializes a new instance of <see cref="ParquetColumnAttribute"/> without renaming the column.

Remarks: Exists so ordering can be expressed on its own — <c>[ParquetColumn(Order = 2)]</c>. With only the name-taking constructor available, reordering a column forced you to restate its name.
ParquetColumnAttribute
ParquetColumnAttribute.ParquetColumnAttribute(string name)

Initializes a new instance of <see cref="ParquetColumnAttribute"/> with the specified column name.

Parameters:
  • name(string)— The name of the column in the Parquet schema.

Properties4

Deduplicate: bool
bool ParquetColumnAttribute.Deduplicate

Gets or sets whether string values in this column should be deduplicated during deserialization. When true, identical string values within a row group share the same object reference, reducing managed heap allocations and memory footprint for low-cardinality columns. <para> Precedence with <c>ParquetSerializerOptions.DeduplicateStrings</c>: the two are combined with "or". <c>true</c> here deduplicates this column even when the option is <c>false</c>; the option set to <c>true</c> deduplicates every string column, and there is no way to switch a column off that this attribute switched on. </para>

Encoding: Parquet.SourceGenerator.ParquetColumnEncoding
ParquetColumnEncoding ParquetColumnAttribute.Encoding

Gets or sets the physical column encoding hint to use when serializing this column. <para> Precedence with <c>ParquetSerializerOptions.ColumnEncodingHints</c>: the attribute is applied first and a hint in the options for the same column name replaces it, so the runtime option wins when both are set (including an explicit <see cref="ParquetColumnEncoding.Default"/>). Only top-level columns carry the attribute hint today; one on a member inside a nested struct or list element is not emitted. </para>

Name: string?
string? ParquetColumnAttribute.Name

Gets or sets the name of the column in the Parquet schema. When null, the member name is used.

Order: int
int ParquetColumnAttribute.Order

Gets or sets the explicit column index order.