lance 12.0.0

A columnar data format that is 100x faster than Parquet for random access.
Documentation
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright The Lance Authors

use std::sync::Arc;

use lance_io::object_store::WrappingObjectStore;
use object_store::{
    ObjectStore,
    throttle::{ThrottleConfig, ThrottledStore},
};

#[derive(Debug, Clone, Default)]
pub struct ThrottledStoreWrapper {
    pub config: ThrottleConfig,
}

impl WrappingObjectStore for ThrottledStoreWrapper {
    fn wrap(&self, _prefix: &str, original: Arc<dyn ObjectStore>) -> Arc<dyn ObjectStore> {
        let throttle_store = ThrottledStore::new(original, self.config);
        Arc::new(throttle_store)
    }

    // Injects behaviour into every request, so a listing must not go around it.
    fn wrap_paginated(
        &self,
        _store_prefix: &str,
        _original: Arc<dyn object_store::list::PaginatedListStore>,
    ) -> Option<Arc<dyn object_store::list::PaginatedListStore>> {
        None
    }
}