pub struct TableDesc {Show 13 fields
pub table_id: TableId,
pub pk: Vec<ColumnOrder>,
pub columns: Vec<ColumnDesc>,
pub distribution_key: Vec<usize>,
pub stream_key: Vec<usize>,
pub vnode_col_index: Option<usize>,
pub append_only: bool,
pub retention_seconds: Option<u32>,
pub value_indices: Vec<usize>,
pub read_prefix_len_hint: usize,
pub watermark_columns: FixedBitSet,
pub vnode_count: usize,
pub versioned: bool,
}
Expand description
Includes necessary information for compute node to access data of the table.
It’s a subset of TableCatalog
in frontend. Refer to TableCatalog
for more details.
Fields§
§table_id: TableId
Id of the table, to find in storage.
pk: Vec<ColumnOrder>
The key used to sort in storage.
columns: Vec<ColumnDesc>
All columns in the table, noticed it is NOT sorted by columnId in the vec.
distribution_key: Vec<usize>
Distribution keys of this table, which corresponds to the corresponding column of the
index. e.g., if distribution_key = [1, 2]
, then columns[1]
and columns[2]
are used
as distribution key.
stream_key: Vec<usize>
Column indices for primary keys.
vnode_col_index: Option<usize>
§append_only: bool
Whether the table source is append-only
retention_seconds: Option<u32>
§value_indices: Vec<usize>
§read_prefix_len_hint: usize
The prefix len of pk, used in bloom filter.
watermark_columns: FixedBitSet
the column indices which could receive watermarks.
vnode_count: usize
Total vnode count of the table.
versioned: bool
Whether the table is versioned. If true
, column-aware row encoding will be used
to be compatible with schema changes.
See version
field in TableCatalog
for more details.
Implementations§
source§impl TableDesc
impl TableDesc
pub fn arrange_key_orders_protobuf(&self) -> Vec<PbColumnOrder>
pub fn order_column_indices(&self) -> Vec<usize>
pub fn order_column_ids(&self) -> Vec<ColumnId>
pub fn try_to_protobuf(&self) -> Result<StorageTableDesc>
sourcepub fn get_id_to_op_idx_mapping(&self) -> HashMap<ColumnId, usize>
pub fn get_id_to_op_idx_mapping(&self) -> HashMap<ColumnId, usize>
Helper function to create a mapping from column id
to column index
pub fn from_pb_table(table: &Table) -> Self
Trait Implementations§
impl Eq for TableDesc
impl StructuralPartialEq for TableDesc
Auto Trait Implementations§
impl Freeze for TableDesc
impl RefUnwindSafe for TableDesc
impl Send for TableDesc
impl Sync for TableDesc
impl Unpin for TableDesc
impl UnwindSafe for TableDesc
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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>
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>
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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
source§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
source§fn relabel(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level
.source§fn relabel_n(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
relabel_num: usize,
) -> RelabeledMetricVec<M>
fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level_relabel_n
.source§fn relabel_debug_1(
self,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level_relabel_n
with metric_level
set to
MetricLevel::Debug
and relabel_num
set to 1.