pub struct BlocksView { /* private fields */ }Expand description
A view of the blocks table, providing access to telemetry block metadata.
Implementations§
Source§impl BlocksView
impl BlocksView
pub fn new() -> Result<BlocksView, Error>
Trait Implementations§
Source§impl Debug for BlocksView
impl Debug for BlocksView
Source§impl View for BlocksView
impl View for BlocksView
Source§fn get_view_set_name(&self) -> Arc<String>
fn get_view_set_name(&self) -> Arc<String>
name of the table from the user’s perspective
Source§fn get_view_instance_id(&self) -> Arc<String>
fn get_view_instance_id(&self) -> Arc<String>
get_view_instance_id can be a process_id, a stream_id or ‘global’.
Source§fn make_batch_partition_spec<'life0, 'async_trait>(
&'life0 self,
lakehouse: Arc<LakehouseContext>,
_existing_partitions: Arc<PartitionCache>,
insert_range: TimeRange,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn PartitionSpec>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
BlocksView: 'async_trait,
fn make_batch_partition_spec<'life0, 'async_trait>(
&'life0 self,
lakehouse: Arc<LakehouseContext>,
_existing_partitions: Arc<PartitionCache>,
insert_range: TimeRange,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn PartitionSpec>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
BlocksView: 'async_trait,
make_batch_partition_spec determines what should be found in an up to date partition.
The resulting PartitionSpec can be used to validate existing partitions are create a new one.
Source§fn get_file_schema_hash(&self) -> Vec<u8> ⓘ
fn get_file_schema_hash(&self) -> Vec<u8> ⓘ
get_file_schema_hash returns a hash (can be a version number, version string, etc.) that allows
to identify out of date partitions.
Source§fn get_file_schema(&self) -> Arc<Schema>
fn get_file_schema(&self) -> Arc<Schema>
get_file_schema returns the schema of the partition file in object storage
Source§fn jit_update<'life0, 'async_trait>(
&'life0 self,
_lakehouse: Arc<LakehouseContext>,
_query_range: Option<TimeRange>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
BlocksView: 'async_trait,
fn jit_update<'life0, 'async_trait>(
&'life0 self,
_lakehouse: Arc<LakehouseContext>,
_query_range: Option<TimeRange>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
BlocksView: 'async_trait,
jit_update creates or updates process-specific partitions before a query
Source§fn make_time_filter(
&self,
begin: DateTime<Utc>,
end: DateTime<Utc>,
) -> Result<Vec<Expr>, Error>
fn make_time_filter( &self, begin: DateTime<Utc>, end: DateTime<Utc>, ) -> Result<Vec<Expr>, Error>
make_time_filter returns a set of expressions that will filter out the rows of the partition
outside the time range requested.
fn get_time_bounds(&self) -> Arc<dyn DataFrameTimeBounds>
Source§fn get_update_group(&self) -> Option<i32>
fn get_update_group(&self) -> Option<i32>
tells the daemon which view should be materialized and in what order
Source§fn get_max_partition_time_delta(
&self,
strategy: &PartitionCreationStrategy,
) -> TimeDelta
fn get_max_partition_time_delta( &self, strategy: &PartitionCreationStrategy, ) -> TimeDelta
allow the view to subdivide the requested partition
Source§fn register_table<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 SessionContext,
table: MaterializedView,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn register_table<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 SessionContext,
table: MaterializedView,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
register the table in the SessionContext
fn merge_partitions<'life0, 'async_trait>(
&'life0 self,
lakehouse: Arc<LakehouseContext>,
partitions_to_merge: Arc<Vec<Partition>>,
partitions_all_views: Arc<PartitionCache>,
insert_range: TimeRange,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn RecordBatchStream<Item = Result<RecordBatch, DataFusionError>> + Send>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations§
impl Freeze for BlocksView
impl RefUnwindSafe for BlocksView
impl Send for BlocksView
impl Sync for BlocksView
impl Unpin for BlocksView
impl UnwindSafe for BlocksView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].