pub const MAX_AGGREGATE_DISTINCT_VALUES_V1: u16 = 256;
pub const MAX_AGGREGATE_STATE_BYTES_V1: u32 = 1_048_576;
pub const MAX_AGGREGATE_ARITHMETIC_OPERATIONS_V1: u32 = 8_192;
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum AggregateSemanticIdentityV1 {
Count,
ExactCount,
Sum,
Min,
Max,
CountPresent,
CountDistinct,
CountDistinctPresent,
Mean,
Any,
All,
}
impl AggregateSemanticIdentityV1 {
#[must_use]
pub fn from_source_spelling(spelling: &str) -> Option<Self> {
aggregate_semantic_registry_v1()
.iter()
.chain(SAAS_OPERATIONAL_AGGREGATE_REGISTRY_V1.iter())
.find(|descriptor| descriptor.source_spelling == spelling)
.map(|descriptor| descriptor.identity)
}
#[must_use]
pub const fn descriptor(self) -> &'static AggregateSemanticDescriptorV1 {
match self {
Self::Count => &AGGREGATE_SEMANTIC_REGISTRY_V1[0],
Self::ExactCount => &AGGREGATE_SEMANTIC_REGISTRY_V1[1],
Self::Sum => &AGGREGATE_SEMANTIC_REGISTRY_V1[2],
Self::Min => &AGGREGATE_SEMANTIC_REGISTRY_V1[3],
Self::Max => &AGGREGATE_SEMANTIC_REGISTRY_V1[4],
Self::CountPresent => &AGGREGATE_SEMANTIC_REGISTRY_V1[5],
Self::CountDistinct => &AGGREGATE_SEMANTIC_REGISTRY_V1[6],
Self::CountDistinctPresent => &AGGREGATE_SEMANTIC_REGISTRY_V1[7],
Self::Mean => &AGGREGATE_SEMANTIC_REGISTRY_V1[8],
Self::Any => &AGGREGATE_SEMANTIC_REGISTRY_V1[9],
Self::All => &AGGREGATE_SEMANTIC_REGISTRY_V1[10],
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct AggregateSemanticSetV1(u16);
impl AggregateSemanticSetV1 {
pub const NONE: Self = Self(0);
pub const BOUNDED_EXACT_CORE: Self = Self(
semantic_bit(AggregateSemanticIdentityV1::Count)
| semantic_bit(AggregateSemanticIdentityV1::Sum)
| semantic_bit(AggregateSemanticIdentityV1::Min)
| semantic_bit(AggregateSemanticIdentityV1::Max)
| semantic_bit(AggregateSemanticIdentityV1::CountPresent)
| semantic_bit(AggregateSemanticIdentityV1::CountDistinct)
| semantic_bit(AggregateSemanticIdentityV1::CountDistinctPresent)
| semantic_bit(AggregateSemanticIdentityV1::Mean)
| semantic_bit(AggregateSemanticIdentityV1::Any)
| semantic_bit(AggregateSemanticIdentityV1::All),
);
pub const EXACT_COUNT_ONLY: Self = Self(semantic_bit(AggregateSemanticIdentityV1::ExactCount));
#[must_use]
pub const fn contains(self, identity: AggregateSemanticIdentityV1) -> bool {
self.0 & semantic_bit(identity) != 0
}
#[must_use]
pub const fn len(self) -> u32 {
self.0.count_ones()
}
#[must_use]
pub const fn is_empty(self) -> bool {
self.0 == 0
}
}
const fn semantic_bit(identity: AggregateSemanticIdentityV1) -> u16 {
match identity {
AggregateSemanticIdentityV1::Count => 1 << 0,
AggregateSemanticIdentityV1::ExactCount => 1 << 1,
AggregateSemanticIdentityV1::Sum => 1 << 2,
AggregateSemanticIdentityV1::Min => 1 << 3,
AggregateSemanticIdentityV1::Max => 1 << 4,
AggregateSemanticIdentityV1::CountPresent => 1 << 5,
AggregateSemanticIdentityV1::CountDistinct => 1 << 6,
AggregateSemanticIdentityV1::CountDistinctPresent => 1 << 7,
AggregateSemanticIdentityV1::Mean => 1 << 8,
AggregateSemanticIdentityV1::Any => 1 << 9,
AggregateSemanticIdentityV1::All => 1 << 10,
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum AggregateInputClassV1 {
NoField,
ExactNumericField,
OrderedScalarField,
CanonicalScalarField,
RequiredBooleanField,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum AggregateNoValueRuleV1 {
CountsRow,
InvalidInputType,
ComparableState,
Excluded,
DistinctValue,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum AggregateEmptyResultV1 {
UnsignedZero,
ExactNumericZero,
Absent,
ExactMeanZero,
BooleanFalse,
BooleanTrue,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum AggregateResultSchemaV1 {
U64,
ExactDecimalAtInputScale,
OptionalInputScalar,
ExactMeanV1,
Bool,
BoundedInputScalarList,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum AggregatePartialStateV1 {
CheckedU64,
CheckedI128AtInputScale,
OptionalOrderedScalar,
BoundedCanonicalSet,
ExactMeanV1,
BooleanAny,
BooleanAll,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum AggregateArithmeticV1 {
CheckedU64,
CheckedI128,
FrozenTypedComparator,
CanonicalDistinctSet,
CheckedExactMean,
BooleanOr,
BooleanAnd,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct AggregateEligibilityV1 {
ordinary_bounded_fold: bool,
grouped_bounded_fold: bool,
whole_result_provider: bool,
}
impl AggregateEligibilityV1 {
#[must_use]
pub const fn ordinary_bounded_fold(self) -> bool {
self.ordinary_bounded_fold
}
#[must_use]
pub const fn grouped_bounded_fold(self) -> bool {
self.grouped_bounded_fold
}
#[must_use]
pub const fn whole_result_provider(self) -> bool {
self.whole_result_provider
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum AggregateBudgetBoundV1 {
NotApplicable,
CompilerPlan,
CompilerPlanWhenGrouped,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct AggregateBudgetDimensionsV1 {
input_rows: AggregateBudgetBoundV1,
distinct_values: AggregateBudgetBoundV1,
groups: AggregateBudgetBoundV1,
state_bytes: AggregateBudgetBoundV1,
output_bytes: AggregateBudgetBoundV1,
diagnostic_work: AggregateBudgetBoundV1,
}
impl AggregateBudgetDimensionsV1 {
#[must_use]
pub const fn charges_input_rows(self) -> bool {
!matches!(self.input_rows, AggregateBudgetBoundV1::NotApplicable)
}
#[must_use]
pub const fn input_rows(self) -> AggregateBudgetBoundV1 {
self.input_rows
}
#[must_use]
pub const fn distinct_values(self) -> AggregateBudgetBoundV1 {
self.distinct_values
}
#[must_use]
pub const fn charges_groups(self) -> bool {
!matches!(self.groups, AggregateBudgetBoundV1::NotApplicable)
}
#[must_use]
pub const fn groups(self) -> AggregateBudgetBoundV1 {
self.groups
}
#[must_use]
pub const fn charges_state_bytes(self) -> bool {
!matches!(self.state_bytes, AggregateBudgetBoundV1::NotApplicable)
}
#[must_use]
pub const fn state_bytes(self) -> AggregateBudgetBoundV1 {
self.state_bytes
}
#[must_use]
pub const fn charges_output_bytes(self) -> bool {
!matches!(self.output_bytes, AggregateBudgetBoundV1::NotApplicable)
}
#[must_use]
pub const fn output_bytes(self) -> AggregateBudgetBoundV1 {
self.output_bytes
}
#[must_use]
pub const fn charges_diagnostic_work(self) -> bool {
!matches!(self.diagnostic_work, AggregateBudgetBoundV1::NotApplicable)
}
#[must_use]
pub const fn diagnostic_work(self) -> AggregateBudgetBoundV1 {
self.diagnostic_work
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct AggregatePolicyV1 {
admits_rows_before_aggregation: bool,
partition_scoped_primary: bool,
withholds_partial_results: bool,
}
impl AggregatePolicyV1 {
#[must_use]
pub const fn admits_rows_before_aggregation(self) -> bool {
self.admits_rows_before_aggregation
}
#[must_use]
pub const fn partition_scoped_primary(self) -> bool {
self.partition_scoped_primary
}
#[must_use]
pub const fn withholds_partial_results(self) -> bool {
self.withholds_partial_results
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1,
source_spelling: &'static str,
input_class: AggregateInputClassV1,
no_value_rule: AggregateNoValueRuleV1,
empty_result: AggregateEmptyResultV1,
result_schema: AggregateResultSchemaV1,
partial_state: AggregatePartialStateV1,
arithmetic: AggregateArithmeticV1,
operational_ir_tag: Option<u8>,
eligibility: AggregateEligibilityV1,
budgets: AggregateBudgetDimensionsV1,
policy: AggregatePolicyV1,
}
impl AggregateSemanticDescriptorV1 {
#[must_use]
pub const fn identity(self) -> AggregateSemanticIdentityV1 {
self.identity
}
#[must_use]
pub const fn source_spelling(self) -> &'static str {
self.source_spelling
}
#[must_use]
pub const fn input_class(self) -> AggregateInputClassV1 {
self.input_class
}
#[must_use]
pub const fn no_value_rule(self) -> AggregateNoValueRuleV1 {
self.no_value_rule
}
#[must_use]
pub const fn empty_result(self) -> AggregateEmptyResultV1 {
self.empty_result
}
#[must_use]
pub const fn result_schema(self) -> AggregateResultSchemaV1 {
self.result_schema
}
#[must_use]
pub const fn partial_state(self) -> AggregatePartialStateV1 {
self.partial_state
}
#[must_use]
pub const fn arithmetic(self) -> AggregateArithmeticV1 {
self.arithmetic
}
#[must_use]
pub const fn operational_ir_tag(self) -> Option<u8> {
self.operational_ir_tag
}
#[must_use]
pub const fn eligibility(self) -> AggregateEligibilityV1 {
self.eligibility
}
#[must_use]
pub const fn budgets(self) -> AggregateBudgetDimensionsV1 {
self.budgets
}
#[must_use]
pub const fn policy(self) -> AggregatePolicyV1 {
self.policy
}
}
const BOUNDED_AND_PROVIDER: AggregateEligibilityV1 = AggregateEligibilityV1 {
ordinary_bounded_fold: true,
grouped_bounded_fold: true,
whole_result_provider: true,
};
const WHOLE_RESULT_ONLY: AggregateEligibilityV1 = AggregateEligibilityV1 {
ordinary_bounded_fold: false,
grouped_bounded_fold: false,
whole_result_provider: true,
};
const EXACT_BUDGETS: AggregateBudgetDimensionsV1 = AggregateBudgetDimensionsV1 {
input_rows: AggregateBudgetBoundV1::CompilerPlan,
distinct_values: AggregateBudgetBoundV1::NotApplicable,
groups: AggregateBudgetBoundV1::CompilerPlanWhenGrouped,
state_bytes: AggregateBudgetBoundV1::CompilerPlan,
output_bytes: AggregateBudgetBoundV1::CompilerPlan,
diagnostic_work: AggregateBudgetBoundV1::CompilerPlan,
};
const EXACT_COUNT_BUDGETS: AggregateBudgetDimensionsV1 = AggregateBudgetDimensionsV1 {
input_rows: AggregateBudgetBoundV1::CompilerPlan,
distinct_values: AggregateBudgetBoundV1::NotApplicable,
groups: AggregateBudgetBoundV1::NotApplicable,
state_bytes: AggregateBudgetBoundV1::CompilerPlan,
output_bytes: AggregateBudgetBoundV1::CompilerPlan,
diagnostic_work: AggregateBudgetBoundV1::CompilerPlan,
};
const EXACT_DISTINCT_BUDGETS: AggregateBudgetDimensionsV1 = AggregateBudgetDimensionsV1 {
input_rows: AggregateBudgetBoundV1::CompilerPlan,
distinct_values: AggregateBudgetBoundV1::CompilerPlan,
groups: AggregateBudgetBoundV1::CompilerPlanWhenGrouped,
state_bytes: AggregateBudgetBoundV1::CompilerPlan,
output_bytes: AggregateBudgetBoundV1::CompilerPlan,
diagnostic_work: AggregateBudgetBoundV1::CompilerPlan,
};
const EXACT_POLICY: AggregatePolicyV1 = AggregatePolicyV1 {
admits_rows_before_aggregation: true,
partition_scoped_primary: true,
withholds_partial_results: true,
};
const AGGREGATE_SEMANTIC_REGISTRY_V1: [AggregateSemanticDescriptorV1; 11] = [
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::Count,
source_spelling: "count",
input_class: AggregateInputClassV1::NoField,
no_value_rule: AggregateNoValueRuleV1::CountsRow,
empty_result: AggregateEmptyResultV1::UnsignedZero,
result_schema: AggregateResultSchemaV1::U64,
partial_state: AggregatePartialStateV1::CheckedU64,
arithmetic: AggregateArithmeticV1::CheckedU64,
operational_ir_tag: Some(1),
eligibility: BOUNDED_AND_PROVIDER,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::ExactCount,
source_spelling: "exact_count",
input_class: AggregateInputClassV1::NoField,
no_value_rule: AggregateNoValueRuleV1::CountsRow,
empty_result: AggregateEmptyResultV1::UnsignedZero,
result_schema: AggregateResultSchemaV1::U64,
partial_state: AggregatePartialStateV1::CheckedU64,
arithmetic: AggregateArithmeticV1::CheckedU64,
operational_ir_tag: None,
eligibility: WHOLE_RESULT_ONLY,
budgets: EXACT_COUNT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::Sum,
source_spelling: "sum",
input_class: AggregateInputClassV1::ExactNumericField,
no_value_rule: AggregateNoValueRuleV1::InvalidInputType,
empty_result: AggregateEmptyResultV1::ExactNumericZero,
result_schema: AggregateResultSchemaV1::ExactDecimalAtInputScale,
partial_state: AggregatePartialStateV1::CheckedI128AtInputScale,
arithmetic: AggregateArithmeticV1::CheckedI128,
operational_ir_tag: Some(2),
eligibility: BOUNDED_AND_PROVIDER,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::Min,
source_spelling: "min",
input_class: AggregateInputClassV1::OrderedScalarField,
no_value_rule: AggregateNoValueRuleV1::ComparableState,
empty_result: AggregateEmptyResultV1::Absent,
result_schema: AggregateResultSchemaV1::OptionalInputScalar,
partial_state: AggregatePartialStateV1::OptionalOrderedScalar,
arithmetic: AggregateArithmeticV1::FrozenTypedComparator,
operational_ir_tag: Some(3),
eligibility: BOUNDED_AND_PROVIDER,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::Max,
source_spelling: "max",
input_class: AggregateInputClassV1::OrderedScalarField,
no_value_rule: AggregateNoValueRuleV1::ComparableState,
empty_result: AggregateEmptyResultV1::Absent,
result_schema: AggregateResultSchemaV1::OptionalInputScalar,
partial_state: AggregatePartialStateV1::OptionalOrderedScalar,
arithmetic: AggregateArithmeticV1::FrozenTypedComparator,
operational_ir_tag: Some(4),
eligibility: BOUNDED_AND_PROVIDER,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::CountPresent,
source_spelling: "count_present",
input_class: AggregateInputClassV1::CanonicalScalarField,
no_value_rule: AggregateNoValueRuleV1::Excluded,
empty_result: AggregateEmptyResultV1::UnsignedZero,
result_schema: AggregateResultSchemaV1::U64,
partial_state: AggregatePartialStateV1::CheckedU64,
arithmetic: AggregateArithmeticV1::CheckedU64,
operational_ir_tag: Some(5),
eligibility: BOUNDED_AND_PROVIDER,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::CountDistinct,
source_spelling: "count_distinct",
input_class: AggregateInputClassV1::CanonicalScalarField,
no_value_rule: AggregateNoValueRuleV1::DistinctValue,
empty_result: AggregateEmptyResultV1::UnsignedZero,
result_schema: AggregateResultSchemaV1::U64,
partial_state: AggregatePartialStateV1::BoundedCanonicalSet,
arithmetic: AggregateArithmeticV1::CanonicalDistinctSet,
operational_ir_tag: Some(6),
eligibility: BOUNDED_AND_PROVIDER,
budgets: EXACT_DISTINCT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::CountDistinctPresent,
source_spelling: "count_distinct_present",
input_class: AggregateInputClassV1::CanonicalScalarField,
no_value_rule: AggregateNoValueRuleV1::Excluded,
empty_result: AggregateEmptyResultV1::UnsignedZero,
result_schema: AggregateResultSchemaV1::U64,
partial_state: AggregatePartialStateV1::BoundedCanonicalSet,
arithmetic: AggregateArithmeticV1::CanonicalDistinctSet,
operational_ir_tag: Some(7),
eligibility: BOUNDED_AND_PROVIDER,
budgets: EXACT_DISTINCT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::Mean,
source_spelling: "mean",
input_class: AggregateInputClassV1::ExactNumericField,
no_value_rule: AggregateNoValueRuleV1::InvalidInputType,
empty_result: AggregateEmptyResultV1::ExactMeanZero,
result_schema: AggregateResultSchemaV1::ExactMeanV1,
partial_state: AggregatePartialStateV1::ExactMeanV1,
arithmetic: AggregateArithmeticV1::CheckedExactMean,
operational_ir_tag: Some(8),
eligibility: BOUNDED_AND_PROVIDER,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::Any,
source_spelling: "any",
input_class: AggregateInputClassV1::RequiredBooleanField,
no_value_rule: AggregateNoValueRuleV1::InvalidInputType,
empty_result: AggregateEmptyResultV1::BooleanFalse,
result_schema: AggregateResultSchemaV1::Bool,
partial_state: AggregatePartialStateV1::BooleanAny,
arithmetic: AggregateArithmeticV1::BooleanOr,
operational_ir_tag: Some(9),
eligibility: BOUNDED_AND_PROVIDER,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::All,
source_spelling: "all",
input_class: AggregateInputClassV1::RequiredBooleanField,
no_value_rule: AggregateNoValueRuleV1::InvalidInputType,
empty_result: AggregateEmptyResultV1::BooleanTrue,
result_schema: AggregateResultSchemaV1::Bool,
partial_state: AggregatePartialStateV1::BooleanAll,
arithmetic: AggregateArithmeticV1::BooleanAnd,
operational_ir_tag: Some(10),
eligibility: BOUNDED_AND_PROVIDER,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
];
const BOUNDED_FOLD_ONLY: AggregateEligibilityV1 = AggregateEligibilityV1 {
ordinary_bounded_fold: true,
grouped_bounded_fold: true,
whole_result_provider: false,
};
const SAAS_OPERATIONAL_AGGREGATE_REGISTRY_V1: [AggregateSemanticDescriptorV1; 9] = [
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::Min,
source_spelling: "median",
input_class: AggregateInputClassV1::OrderedScalarField,
no_value_rule: AggregateNoValueRuleV1::Excluded,
empty_result: AggregateEmptyResultV1::Absent,
result_schema: AggregateResultSchemaV1::OptionalInputScalar,
partial_state: AggregatePartialStateV1::OptionalOrderedScalar,
arithmetic: AggregateArithmeticV1::FrozenTypedComparator,
operational_ir_tag: Some(11),
eligibility: BOUNDED_FOLD_ONLY,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::Min,
source_spelling: "p90",
input_class: AggregateInputClassV1::OrderedScalarField,
no_value_rule: AggregateNoValueRuleV1::Excluded,
empty_result: AggregateEmptyResultV1::Absent,
result_schema: AggregateResultSchemaV1::OptionalInputScalar,
partial_state: AggregatePartialStateV1::OptionalOrderedScalar,
arithmetic: AggregateArithmeticV1::FrozenTypedComparator,
operational_ir_tag: Some(12),
eligibility: BOUNDED_FOLD_ONLY,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::Min,
source_spelling: "p95",
input_class: AggregateInputClassV1::OrderedScalarField,
no_value_rule: AggregateNoValueRuleV1::Excluded,
empty_result: AggregateEmptyResultV1::Absent,
result_schema: AggregateResultSchemaV1::OptionalInputScalar,
partial_state: AggregatePartialStateV1::OptionalOrderedScalar,
arithmetic: AggregateArithmeticV1::FrozenTypedComparator,
operational_ir_tag: Some(13),
eligibility: BOUNDED_FOLD_ONLY,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::Min,
source_spelling: "p99",
input_class: AggregateInputClassV1::OrderedScalarField,
no_value_rule: AggregateNoValueRuleV1::Excluded,
empty_result: AggregateEmptyResultV1::Absent,
result_schema: AggregateResultSchemaV1::OptionalInputScalar,
partial_state: AggregatePartialStateV1::OptionalOrderedScalar,
arithmetic: AggregateArithmeticV1::FrozenTypedComparator,
operational_ir_tag: Some(14),
eligibility: BOUNDED_FOLD_ONLY,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::Min,
source_spelling: "first",
input_class: AggregateInputClassV1::CanonicalScalarField,
no_value_rule: AggregateNoValueRuleV1::Excluded,
empty_result: AggregateEmptyResultV1::Absent,
result_schema: AggregateResultSchemaV1::OptionalInputScalar,
partial_state: AggregatePartialStateV1::OptionalOrderedScalar,
arithmetic: AggregateArithmeticV1::FrozenTypedComparator,
operational_ir_tag: Some(15),
eligibility: BOUNDED_FOLD_ONLY,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::Max,
source_spelling: "last",
input_class: AggregateInputClassV1::CanonicalScalarField,
no_value_rule: AggregateNoValueRuleV1::Excluded,
empty_result: AggregateEmptyResultV1::Absent,
result_schema: AggregateResultSchemaV1::OptionalInputScalar,
partial_state: AggregatePartialStateV1::OptionalOrderedScalar,
arithmetic: AggregateArithmeticV1::FrozenTypedComparator,
operational_ir_tag: Some(16),
eligibility: BOUNDED_FOLD_ONLY,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::Sum,
source_spelling: "stddev",
input_class: AggregateInputClassV1::ExactNumericField,
no_value_rule: AggregateNoValueRuleV1::Excluded,
empty_result: AggregateEmptyResultV1::ExactNumericZero,
result_schema: AggregateResultSchemaV1::ExactDecimalAtInputScale,
partial_state: AggregatePartialStateV1::CheckedI128AtInputScale,
arithmetic: AggregateArithmeticV1::CheckedI128,
operational_ir_tag: Some(17),
eligibility: BOUNDED_FOLD_ONLY,
budgets: EXACT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::CountPresent,
source_spelling: "collect",
input_class: AggregateInputClassV1::CanonicalScalarField,
no_value_rule: AggregateNoValueRuleV1::Excluded,
empty_result: AggregateEmptyResultV1::UnsignedZero,
result_schema: AggregateResultSchemaV1::BoundedInputScalarList,
partial_state: AggregatePartialStateV1::BoundedCanonicalSet,
arithmetic: AggregateArithmeticV1::CanonicalDistinctSet,
operational_ir_tag: Some(18),
eligibility: BOUNDED_FOLD_ONLY,
budgets: EXACT_DISTINCT_BUDGETS,
policy: EXACT_POLICY,
},
AggregateSemanticDescriptorV1 {
identity: AggregateSemanticIdentityV1::CountDistinctPresent,
source_spelling: "collect_distinct",
input_class: AggregateInputClassV1::CanonicalScalarField,
no_value_rule: AggregateNoValueRuleV1::Excluded,
empty_result: AggregateEmptyResultV1::UnsignedZero,
result_schema: AggregateResultSchemaV1::BoundedInputScalarList,
partial_state: AggregatePartialStateV1::BoundedCanonicalSet,
arithmetic: AggregateArithmeticV1::CanonicalDistinctSet,
operational_ir_tag: Some(19),
eligibility: BOUNDED_FOLD_ONLY,
budgets: EXACT_DISTINCT_BUDGETS,
policy: EXACT_POLICY,
},
];
#[must_use]
pub const fn aggregate_semantic_registry_v1() -> &'static [AggregateSemanticDescriptorV1] {
&AGGREGATE_SEMANTIC_REGISTRY_V1
}