pub struct Following {
pub offset: i64,
pub offset_expr: Option<Box<Expression>>,
}Expand description
Defines a bound later than the current record in the declared ordering in sorts.
Fields§
§offset: i64A strictly positive integer specifying the offset of this bound. Use CurrentRow for offset zero and Preceding for negative offsets.
At least one of offset and offset_expr must be set; setting
neither is invalid. Because offset has no explicit presence, it is
considered set when it is non-zero; zero was never a valid offset.
Consumers must use offset_expr when it is set and ignore offset.
Producers may set both during migration, in which case offset must
be the int64-literal equivalent of offset_expr – possible only
when the distance is a positive int64 literal – so that consumers
which do not yet read offset_expr can still execute the plan.
Deprecated: use offset_expr instead.
offset_expr: Option<Box<Expression>>Expression specifying the distance of this bound from the current
row. Its interpretation depends on WindowFunction.bounds_type:
- BOUNDS_TYPE_ROWS: evaluates to a non-negative integer number of rows. The type must be int64.
- BOUNDS_TYPE_RANGE: evaluates to a non-negative distance
applied toward values later in the declared ordering in
sorts. Its type D must be compatible with the type T of the single ordering expression, i.e.add(T, D) -> Tandsubtract(T, D) -> Tmust be defined (e.g. timestamp/interval_day, decimal/decimal, i64/i64).
A null offset expression result is invalid. When the current row’s
ordering value is null, a RANGE offset bound is equivalent to CurrentRow.
A negative result is invalid; a zero result is equivalent
to CurrentRow. Because offset cannot represent zero, producers
should emit CurrentRow rather than a zero offset_expr so that the
bound remains readable by consumers that do not yet support
offset_expr. Use Preceding for a bound before the current row.
Field references resolve against the input schema of the relation containing this window function; the expression must behave as if evaluated once per input record. It must not contain window or aggregate functions.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Following
impl<'de> Deserialize<'de> for Following
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Following, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Following, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Message for Following
impl Message for Following
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 Name for Following
impl Name for Following
Source§const NAME: &'static str = "Following"
const NAME: &'static str = "Following"
Message.
This name is the same as it appears in the source .proto file, e.g. FooBar.Source§const PACKAGE: &'static str = "substrait"
const PACKAGE: &'static str = "substrait"
., e.g. google.protobuf.Source§fn full_name() -> String
fn full_name() -> String
Message.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.