pub struct FactTableMetadata {
pub table_name: String,
pub measures: Vec<MeasureColumn>,
pub dimensions: DimensionColumn,
pub denormalized_filters: Vec<FilterColumn>,
pub calendar_dimensions: Vec<CalendarDimension>,
pub partial_period: Option<PartialPeriodConfig>,
pub native_measures: HashMap<String, String>,
pub native_dimension_mapping: HashMap<String, String>,
}Expand description
Metadata about a fact table structure
Fields§
§table_name: StringTable name (e.g., “tf_sales”)
measures: Vec<MeasureColumn>Measures (aggregatable numeric columns)
dimensions: DimensionColumnDimension column (JSONB)
denormalized_filters: Vec<FilterColumn>Denormalized filter columns
calendar_dimensions: Vec<CalendarDimension>Calendar dimensions for optimized temporal aggregations
partial_period: Option<PartialPeriodConfig>Optional partial-period awareness configuration.
When a coarse-grain fact table (e.g. monthly pre-aggregated) is queried with a date filter that falls mid-period, the runtime generates a UNION ALL query combining fine-grain source data for boundary periods with pre-aggregated data for complete intermediate periods.
native_measures: HashMap<String, String>Maps JSONB measure paths to flat SQL column names for pre-aggregated views.
When a materialized view stores measures as native columns (e.g. volume BIGINT)
instead of inside a JSONB data column, this mapping tells the SQL generator to
use SUM("volume") instead of SUM((data->'measures'->>'volume')::numeric).
native_dimension_mapping: HashMap<String, String>Maps deep JSONB dimension paths to flat SQL column names.
When a materialized view denormalizes dimension values into flat columns
(e.g. category_id INT instead of data->'dimensions'->'category'->>'id'),
this mapping tells the GROUP BY generator to use GROUP BY "category_id"
instead of JSONB extraction. Enables btree index usage.
Trait Implementations§
Source§impl Clone for FactTableMetadata
impl Clone for FactTableMetadata
Source§fn clone(&self) -> FactTableMetadata
fn clone(&self) -> FactTableMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FactTableMetadata
impl Debug for FactTableMetadata
Source§impl<'de> Deserialize<'de> for FactTableMetadata
impl<'de> Deserialize<'de> for FactTableMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for FactTableMetadata
Source§impl PartialEq for FactTableMetadata
impl PartialEq for FactTableMetadata
Source§impl Serialize for FactTableMetadata
impl Serialize for FactTableMetadata
impl StructuralPartialEq for FactTableMetadata
Auto Trait Implementations§
impl Freeze for FactTableMetadata
impl RefUnwindSafe for FactTableMetadata
impl Send for FactTableMetadata
impl Sync for FactTableMetadata
impl Unpin for FactTableMetadata
impl UnsafeUnpin for FactTableMetadata
impl UnwindSafe for FactTableMetadata
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.