pub struct Preceding {
pub offset: i64,
pub offset_expr: Option<Box<Expression>>,
}Expand description
Defines a bound earlier 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 Following for negative offsets.
At least one of offset and offset_expr must be set.
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 earlier 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 Following for a bound after 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 Message for Preceding
impl Message for Preceding
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 Preceding
impl Name for Preceding
Source§const NAME: &'static str = "Preceding"
const NAME: &'static str = "Preceding"
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.