Table of Contents

Delegate DatasetFilePath

Namespace
Plank.Dataset
Assembly
Plank.dll

Selects the UTF-8 path of a file produced for a dataset partition.

public delegate ReadOnlySpan<byte> DatasetFilePath(ReadOnlySpan<byte> partitionKey, ulong fileIndex, IParquetBufferPool bufferPool, out ParquetBuffer? allocation)

Parameters

partitionKey ReadOnlySpan<byte>

The partition key selected from a row.

fileIndex ulong

The zero-based index of the file in this dataset write.

bufferPool IParquetBufferPool

The writer buffer pool.

allocation ParquetBuffer?

The optional allocation that owns the returned path. Set it to null when the path has another owner.

Returns

ReadOnlySpan<byte>

The full UTF-8 file path.

Remarks

Each returned path must identify a new file. Existing files are not overwritten or appended to. The file index restarts at zero for each dataset writer, so paths must also be unique across writes.