pub struct AggregateFunction {
pub function_reference: u32,
pub arguments: Vec<FunctionArgument>,
pub options: Vec<FunctionOption>,
pub output_type: Option<Type>,
pub phase: i32,
pub sorts: Vec<SortField>,
pub invocation: i32,
pub args: Vec<Expression>,
}Expand description
An aggregate function.
Fields§
§function_reference: u32Points to a function_anchor defined in this plan, which must refer to an aggregate function in the associated YAML file. Required; 0 is considered to be a valid anchor/reference.
arguments: Vec<FunctionArgument>The arguments to be bound to the function. This must have exactly the number of arguments specified in the function definition, and the argument types must also match exactly:
- Value arguments must be bound using FunctionArgument.value, and the expression in that must yield a value of a type that a function overload is defined for.
- Type arguments must be bound using FunctionArgument.type, and a function overload must be defined for that type.
- Enum arguments must be bound using FunctionArgument.enum followed by Enum.specified, with a string that case-insensitively matches one of the allowed options.
- Optional enum arguments must be bound using FunctionArgument.enum followed by either Enum.specified or Enum.unspecified. If specified, the string must case-insensitively match one of the allowed options.
options: Vec<FunctionOption>Options to specify behavior for corner cases, or leave behavior unspecified if the consumer does not need specific behavior in these cases.
output_type: Option<Type>Must be set to the return type of the function, exactly as derived using the declaration in the extension.
phase: i32Describes which part of the aggregation to perform within the context of distributed algorithms. Required. Must be set to INITIAL_TO_RESULT for aggregate functions that are not decomposable.
sorts: Vec<SortField>If specified, the aggregated records are ordered according to this list before they are aggregated. The first sort field has the highest priority; only if a sort field determines two records to be equivalent is the next field queried. This field is optional.
invocation: i32Specifies whether equivalent records are merged before being aggregated. Optional, defaults to AGGREGATION_INVOCATION_ALL.
args: Vec<Expression>deprecated; use arguments instead
Implementations§
Source§impl AggregateFunction
impl AggregateFunction
Sourcepub fn phase(&self) -> AggregationPhase
pub fn phase(&self) -> AggregationPhase
Returns the enum value of phase, or the default if the field is set to an invalid enum value.
Sourcepub fn set_phase(&mut self, value: AggregationPhase)
pub fn set_phase(&mut self, value: AggregationPhase)
Sets phase to the provided enum value.
Sourcepub fn invocation(&self) -> AggregationInvocation
pub fn invocation(&self) -> AggregationInvocation
Returns the enum value of invocation, or the default if the field is set to an invalid enum value.
Sourcepub fn set_invocation(&mut self, value: AggregationInvocation)
pub fn set_invocation(&mut self, value: AggregationInvocation)
Sets invocation to the provided enum value.
Trait Implementations§
Source§impl Clone for AggregateFunction
impl Clone for AggregateFunction
Source§fn clone(&self) -> AggregateFunction
fn clone(&self) -> AggregateFunction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AggregateFunction
impl Debug for AggregateFunction
Source§impl Default for AggregateFunction
impl Default for AggregateFunction
Source§impl InputNode for AggregateFunction
impl InputNode for AggregateFunction
Source§fn type_to_node() -> Node
fn type_to_node() -> Node
Source§fn data_to_node(&self) -> Node
fn data_to_node(&self) -> Node
Source§fn oneof_variant(&self) -> Option<&'static str>
fn oneof_variant(&self) -> Option<&'static str>
Source§fn parse_unknown(&self, y: &mut Context<'_>) -> bool
fn parse_unknown(&self, y: &mut Context<'_>) -> bool
Source§impl Message for AggregateFunction
impl Message for AggregateFunction
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for AggregateFunction
impl PartialEq for AggregateFunction
Source§impl ProtoMessage for AggregateFunction
impl ProtoMessage for AggregateFunction
Source§fn proto_message_type() -> &'static str
fn proto_message_type() -> &'static str
impl StructuralPartialEq for AggregateFunction
Auto Trait Implementations§
impl Freeze for AggregateFunction
impl RefUnwindSafe for AggregateFunction
impl Send for AggregateFunction
impl Sync for AggregateFunction
impl Unpin for AggregateFunction
impl UnwindSafe for AggregateFunction
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointerSource§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§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
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 more