Skip to main content

ExprOp

Enum ExprOp 

Source
pub enum ExprOp {
Show 18 variants LoadCol { col: u8, dst: Reg, }, LoadConst { v: OwnedValue, dst: Reg, }, Binary { op: BinOp, l: Reg, r: Reg, dst: Reg, }, Math { op: MathOp, src: Reg, dst: Reg, }, MathPair { op: MathPair, l: Reg, r: Reg, dst: Reg, }, StrLen { op: StrLen, src: Reg, dst: Reg, }, StrFold { op: StrFold, src: Reg, dst: Reg, }, StrTrim { ends: StrTrim, set: Arc<TrimSet>, src: Reg, dst: Reg, }, StrCut { end: StrCut, src: Reg, n: Reg, dst: Reg, }, StrNorm { form: NormalForm, src: Reg, dst: Reg, }, StrNormalized { form: NormalForm, negated: bool, src: Reg, dst: Reg, }, ElementId { table: u32, src: Reg, dst: Reg, }, Between { of: LogicalType, kind: DurationKind, from: Reg, to: Reg, dst: Reg, }, Compare { op: CmpOp, l: Reg, r: Reg, dst: Reg, }, IsNull { src: Reg, negated: bool, dst: Reg, }, All { on: bool, dst: Reg, }, And { l: Reg, r: Reg, dst: Reg, }, Or { l: Reg, r: Reg, dst: Reg, },
}

Variants§

§

LoadCol

Read a chunk column into a register. A borrow at evaluation, not a copy; the register remembers the column index.

Fields

§col: u8
§dst: Reg
§

LoadConst

Fields

§dst: Reg
§

Binary

Fields

§dst: Reg
§

Math

One of the numeric functions over a single number, whose answer is a value like any other. The op carries which function it is, so a call costs no dispatch per row.

Fields

§src: Reg
§dst: Reg
§

MathPair

One of the numeric functions over two numbers: POWER, LOG and MOD under its function spelling. Two registers in and one out, and both arguments hold the one type by the time they get here.

Fields

§dst: Reg
§

StrLen

The length of a string, in characters or in bytes. The answer is a number, so this is the one string function whose output needs no room in the arena for bytes.

Fields

§src: Reg
§dst: Reg
§

StrFold

A fold of a string, up or down. The answer is a string, so this is the first op whose output carries bytes of its own rather than only numbers.

Fields

§src: Reg
§dst: Reg
§

StrTrim

A trim of a string, off either end or both. The set of characters is whatever the statement wrote, prepared once at compile time and shared by every chunk the program runs over, since it is the same set for all of them.

Fields

§ends: StrTrim
§src: Reg
§dst: Reg
§

StrCut

The characters at one end of a string, counted by a second register rather than by something the statement wrote, since LEFT and RIGHT take their count as an ordinary argument and a column is one of the things that can arrive in it.

Fields

§src: Reg
§dst: Reg
§

StrNorm

A string put into one of the four normal forms. The form is whatever the statement wrote, or NFC where it wrote none, and it is the same form for every chunk the program runs over.

Fields

§src: Reg
§dst: Reg
§

StrNormalized

Whether a string is in a normal form already. This is the one string op whose answer is a predicate rather than a value, so it writes a bitmap the way a comparison does. negated carries the NOT, which belongs in the kernel: a null row is off in either answer, and a complement of the bitmap would have turned it on.

Fields

§negated: bool
§src: Reg
§dst: Reg
§

ElementId

The identifier of a node, which is the one element function whose answer is a string. The table comes from the plan, a level having one for every row it will ever produce, and the register holds the rows themselves.

Fields

§table: u32
§src: Reg
§dst: Reg
§

Between

The length of time from one instant to another. The op carries the type both operands hold and the kind of duration asked for, which is everything the kernel needs to pick its loop, so the choice is made once a chunk and no value in the loop carries a tag.

Fields

§from: Reg
§to: Reg
§dst: Reg
§

Compare

Comparison produces a predicate bitmap register.

Fields

§dst: Reg
§

IsNull

A null test reads the operand’s validity, which is the answer already: IS NULL is the complement of the validity bitmap, IS NOT NULL is the bitmap itself. negated carries the NOT.

Fields

§src: Reg
§negated: bool
§dst: Reg
§

All

A predicate the rows cannot change: every row passes, or none does. IS TYPED against the type a column already has is the case that puts one here, since the answer is a fact about the column and the compiler knows it before a row is read. Writing it as an op rather than dropping the filter keeps the program able to say false, which a dropped filter cannot.

Fields

§on: bool
§dst: Reg
§

And

Fields

§dst: Reg
§

Or

Fields

§dst: Reg

Trait Implementations§

Source§

impl Clone for ExprOp

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExprOp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.