Logo Deedle

VirtualLookupRange Module

Helpers for configuring searchable columns on virtual sources.

Functions and values

Function or value Description

VirtualLookupRange.MaxInferredSearchCardinality

Full Usage: VirtualLookupRange.MaxInferredSearchCardinality

Returns: int

Maximum distinct non-empty string values for automatic LookupRange inference. Inference scans the full column at load time and may build an IndexList map; this cap keeps that work bounded for enum-like columns and forces an explicit LookupRange mode (e.g. scan) when cardinality is high. Not tied to an existing Deedle constant — chosen as a conservative "small categorical" threshold (typical search columns ≪ 64; tests use ~100+ distinct as the high-cardinality case).

Returns: int

VirtualLookupRange.classifyLookupRange mode

Full Usage: VirtualLookupRange.classifyLookupRange mode

Parameters:
Returns: VirtualColumnLookupRange
Type parameters: 'T

Classify a configured [`LookupRangeMode`] for diagnostics (`Virtual.TryGetLookupRange`).

mode : LookupRangeMode<'T>
Returns: VirtualColumnLookupRange

VirtualLookupRange.exactFixed selector

Full Usage: VirtualLookupRange.exactFixed selector

Parameters:
    selector : 'T -> int64 * int64

Returns: LookupRangeMode<'T>
Type parameters: 'T
selector : 'T -> int64 * int64
Returns: LookupRangeMode<'T>

VirtualLookupRange.forCategorical indicesByValue

Full Usage: VirtualLookupRange.forCategorical indicesByValue

Parameters:
    indicesByValue : Map<'T, int64 list>

Returns: LookupRangeMode<'T>
Type parameters: 'T (requires comparison)

IndexList LookupRange from a pre-built map of value -> row indices.

indicesByValue : Map<'T, int64 list>
Returns: LookupRangeMode<'T>

VirtualLookupRange.forCategoricalScan length valueAt

Full Usage: VirtualLookupRange.forCategoricalScan length valueAt

Parameters:
    length : int64
    valueAt : int64 -> 'T

Returns: LookupRangeMode<'T>
Type parameters: 'T (requires comparison)

Build categorical IndexList by scanning column values once at frame construction.

length : int64
valueAt : int64 -> 'T
Returns: LookupRangeMode<'T>

VirtualLookupRange.forCategoricalScanPresent length valueAt

Full Usage: VirtualLookupRange.forCategoricalScanPresent length valueAt

Parameters:
    length : int64
    valueAt : int64 -> 'T option

Returns: LookupRangeMode<'T>
Type parameters: 'T (requires comparison)

Build categorical IndexList by scanning present (non-missing) values once at frame construction.

length : int64
valueAt : int64 -> 'T option
Returns: LookupRangeMode<'T>

VirtualLookupRange.forRepeatingCycle values

Full Usage: VirtualLookupRange.forRepeatingCycle values

Parameters:
    values : 'T[]

Returns: LookupRangeMode<'T>
Type parameters: 'T (requires equality)

Step LookupRange for values repeating on a fixed cycle (periodic categorical data). Unknown values yield an empty range (negative offset) instead of throwing.

values : 'T[]
Returns: LookupRangeMode<'T>

VirtualLookupRange.fullFixed

Full Usage: VirtualLookupRange.fullFixed

Returns: LookupRangeMode<'a>
Type parameters: 'a
Returns: LookupRangeMode<'a>

VirtualLookupRange.resolveSearchColumnsLookupRange apiName searchColumns columnName columnKind inferStringValues inferInt64Values inferFloatValues

Full Usage: VirtualLookupRange.resolveSearchColumnsLookupRange apiName searchColumns columnName columnKind inferStringValues inferInt64Values inferFloatValues

Parameters:
Returns: ResolvedColumnSearch

Resolve LookupRange for one column from [`VirtualReadCsvOptions.SearchColumns`] / Parquet equivalent.

apiName : string
searchColumns : VirtualSearchColumn list
columnName : string
columnKind : string
inferStringValues : unit -> (LookupRangeMode<string> * string) option
inferInt64Values : unit -> (LookupRangeMode<int64> * string) option
inferFloatValues : unit -> (LookupRangeMode<float> * string) option
Returns: ResolvedColumnSearch

VirtualLookupRange.scan length valueAt

Full Usage: VirtualLookupRange.scan length valueAt

Parameters:
    length : int64
    valueAt : int64 -> 'T

Returns: LookupRangeMode<'T>
Type parameters: 'T (requires equality)

Correct but O(N) per filter - scans all rows when LookupRange is invoked.

length : int64
valueAt : int64 -> 'T
Returns: LookupRangeMode<'T>

VirtualLookupRange.tryInferFloatLookupRange length valueAt

Full Usage: VirtualLookupRange.tryInferFloatLookupRange length valueAt

Parameters:
    length : int64
    valueAt : int64 -> float option

Returns: (LookupRangeMode<float> * string) option

Infer Step or categorical IndexList LookupRange for float columns (≤ [`MaxInferredSearchCardinality`] distinct present values).

length : int64
valueAt : int64 -> float option
Returns: (LookupRangeMode<float> * string) option

VirtualLookupRange.tryInferInt64LookupRange length valueAt

Full Usage: VirtualLookupRange.tryInferInt64LookupRange length valueAt

Parameters:
    length : int64
    valueAt : int64 -> int64 option

Returns: (LookupRangeMode<int64> * string) option

Infer Step or categorical IndexList LookupRange for int64 columns (≤ [`MaxInferredSearchCardinality`] distinct present values).

length : int64
valueAt : int64 -> int64 option
Returns: (LookupRangeMode<int64> * string) option

VirtualLookupRange.tryInferStringLookupRange length valueAt

Full Usage: VirtualLookupRange.tryInferStringLookupRange length valueAt

Parameters:
    length : int64
    valueAt : int64 -> string

Returns: (LookupRangeMode<string> * string) option

Infer Step or categorical IndexList LookupRange from column values (ReadCsv / ReadParquet).

length : int64
valueAt : int64 -> string
Returns: (LookupRangeMode<string> * string) option

Type something to start searching.