Skip to main content

duckdb_list_vector_reserve

Function duckdb_list_vector_reserve 

Source
pub unsafe extern "C" fn duckdb_list_vector_reserve(
    vector: duckdb_vector,
    required_capacity: idx_t,
) -> duckdb_state
Expand description

Sets the capacity of the underlying child-vector of a list vector. We increment to the next power of two, based on the required capacity. Thus, the capacity might not match the size of the list (capacity >= size), which is set via duckdb_list_vector_set_size.

@param vector The list vector. @param required_capacity The child buffer capacity to reserve. @return The duckdb state. Returns DuckDBError, if the vector is nullptr.