Skip to main content

DEFAULT_REBUILD_DENSITY_THRESHOLD

Constant DEFAULT_REBUILD_DENSITY_THRESHOLD 

Source
pub const DEFAULT_REBUILD_DENSITY_THRESHOLD: f32 = 0.1;
Expand description

Density threshold to decide whether to rebuild a sparse ListViewArray.

A ListViewArray can accumulate unreferenced bytes in its elements buffer after metadata-only operations like take and filter. When density (referenced fraction of elements) falls below this threshold, the benefits of a rebuild may outweigh its cost.

This is a somewhat arbitrary rule-of-thumb and may be suboptimal depending on different use cases and list element dtypes.