ReferenceSPQL

Expressions & Operators

Compare values and combine arithmetic and logical expressions.

Scalar Functions

FunctionSummary
spql.addAdd two values.
spql.andReturn the boolean conjunction of two values.
spql.divDivide the left value by the right value.
spql.eqReturn whether two values are equal.
spql.gtReturn whether the left value is greater than the right value.
spql.gteReturn whether the left value is greater than or equal to the right value.
spql.ilikeReturn whether a UTF8 value matches a SQL ILIKE pattern.
spql.is_nullReturn whether a value is null.
spql.isfiniteTest whether a floating-point value is finite.
spql.isinfTest whether a floating-point value is infinite.
spql.isnanTest whether a floating-point value is NaN.
spql.likeReturn whether a UTF8 value matches a SQL LIKE pattern.
spql.ltReturn whether the left value is less than the right value.
spql.lteReturn whether the left value is less than or equal to the right value.
spql.mulMultiply two values.
spql.neqReturn whether two values are not equal.
spql.notInvert a boolean value.
spql.not_ilikeReturn whether a UTF8 value does not match a SQL ILIKE pattern.
spql.not_likeReturn whether a UTF8 value does not match a SQL LIKE pattern.
spql.orReturn the boolean disjunction of two values.
spql.subSubtract the right value from the left value.

spql.add

Add two values.

  • Kind: scalar function
  • Volatility: immutable
spql.add(left, right) -> u8?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu8Left-hand value.
rightyesu8Right-hand value.

Returns

The sum as a value or expression.

spql.add(left, right) -> i8?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi8Left-hand value.
rightyesi8Right-hand value.

Returns

The sum as a value or expression.

spql.add(left, right) -> u16?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu16Left-hand value.
rightyesu16Right-hand value.

Returns

The sum as a value or expression.

spql.add(left, right) -> i16?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi16Left-hand value.
rightyesi16Right-hand value.

Returns

The sum as a value or expression.

spql.add(left, right) -> u32?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu32Left-hand value.
rightyesu32Right-hand value.

Returns

The sum as a value or expression.

spql.add(left, right) -> i32?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi32Left-hand value.
rightyesi32Right-hand value.

Returns

The sum as a value or expression.

spql.add(left, right) -> u64?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu64Left-hand value.
rightyesu64Right-hand value.

Returns

The sum as a value or expression.

spql.add(left, right) -> i64?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi64Left-hand value.
rightyesi64Right-hand value.

Returns

The sum as a value or expression.

spql.add(left, right) -> f16?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesf16Left-hand value.
rightyesf16Right-hand value.

Returns

The sum as a value or expression.

spql.add(left, right) -> f32?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesf32Left-hand value.
rightyesf32Right-hand value.

Returns

The sum as a value or expression.

spql.add(left, right) -> f64?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesf64Left-hand value.
rightyesf64Right-hand value.

Returns

The sum as a value or expression.

spql.add(left, right) -> inferred

The result type and nullability are inferred from the argument types when the call is bound.

Parameters

NameRequiredTypeDescription
leftyesTLeft-hand value.
rightyesTRight-hand value.

Returns

The sum as a value or expression.

spql.add(left, right) -> inferred

The result type and nullability are inferred from the argument types when the call is bound.

Temporal overloads retain the date or timestamp type, unit and timezone. An Interval applies months first, clamping to the target month's last valid day, then calendar days, then elapsed nanoseconds. Subtraction negates each component and uses the same order. Month clamping is neither associative nor reversible.

Calendar components modify local fields and resolve their combined result once, rejecting repeated or skipped local times before applying elapsed nanoseconds. Zero calendar components preserve the input instant. A Duration is entirely elapsed time. Date results must be whole days; timestamp results must be exact in their retained unit. Null operands propagate null. Overflow and non-null intervals with null components fail.

Parameters

NameRequiredTypeDescription
leftyesvortex.date | vortex.timestamp, spql.Interval | spql.DurationLeft-hand value.
rightyesspql.Interval | spql.Duration, vortex.date | vortex.timestampRight-hand value.

Returns

The sum as a value or expression.

spql.and

Return the boolean conjunction of two values.

  • Kind: scalar function
  • Volatility: immutable
spql.and(left, right) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesboolLeft-hand boolean value.
rightyesboolRight-hand boolean value.

Returns

A boolean value or expression.

spql.div

Divide the left value by the right value.

  • Kind: scalar function
  • Volatility: immutable
spql.div(left, right) -> u8?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu8Left-hand value.
rightyesu8Right-hand value.

Returns

The quotient as a value or expression.

spql.div(left, right) -> i8?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi8Left-hand value.
rightyesi8Right-hand value.

Returns

The quotient as a value or expression.

spql.div(left, right) -> u16?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu16Left-hand value.
rightyesu16Right-hand value.

Returns

The quotient as a value or expression.

spql.div(left, right) -> i16?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi16Left-hand value.
rightyesi16Right-hand value.

Returns

The quotient as a value or expression.

spql.div(left, right) -> u32?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu32Left-hand value.
rightyesu32Right-hand value.

Returns

The quotient as a value or expression.

spql.div(left, right) -> i32?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi32Left-hand value.
rightyesi32Right-hand value.

Returns

The quotient as a value or expression.

spql.div(left, right) -> u64?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu64Left-hand value.
rightyesu64Right-hand value.

Returns

The quotient as a value or expression.

spql.div(left, right) -> i64?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi64Left-hand value.
rightyesi64Right-hand value.

Returns

The quotient as a value or expression.

spql.div(left, right) -> f16?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesf16Left-hand value.
rightyesf16Right-hand value.

Returns

The quotient as a value or expression.

spql.div(left, right) -> f32?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesf32Left-hand value.
rightyesf32Right-hand value.

Returns

The quotient as a value or expression.

spql.div(left, right) -> f64?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesf64Left-hand value.
rightyesf64Right-hand value.

Returns

The quotient as a value or expression.

spql.div(left, right) -> inferred

The result type and nullability are inferred from the argument types when the call is bound.

Parameters

NameRequiredTypeDescription
leftyesTLeft-hand value.
rightyesTRight-hand value.

Returns

The quotient as a value or expression.

spql.eq

Return whether two values are equal.

  • Kind: scalar function
  • Volatility: immutable
spql.eq(left, right) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesTLeft-hand value.
rightyesTRight-hand value.

Returns

A boolean value or expression.

spql.gt

Return whether the left value is greater than the right value.

  • Kind: scalar function
  • Volatility: immutable
spql.gt(left, right) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesTLeft-hand value.
rightyesTRight-hand value.

Returns

A boolean value or expression.

spql.gte

Return whether the left value is greater than or equal to the right value.

  • Kind: scalar function
  • Volatility: immutable
spql.gte(left, right) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesTLeft-hand value.
rightyesTRight-hand value.

Returns

A boolean value or expression.

spql.ilike

Return whether a UTF8 value matches a SQL ILIKE pattern.

  • Kind: scalar function
  • Volatility: immutable
spql.ilike(value, pattern) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
valueyesutf8Input UTF8 value.
patternyesutf8SQL pattern.

Returns

A boolean value or expression.

spql.is_null

Return whether a value is null.

  • Kind: scalar function
  • Volatility: immutable
spql.is_null(value) -> bool

Parameters

NameRequiredTypeDescription
valueyesnull?Value to test for nullness.

Returns

A boolean value or expression.

spql.is_null(value) -> inferred

The result type and nullability are inferred from the argument types when the call is bound.

Parameters

NameRequiredTypeDescription
valueyesTValue to test for nullness.

Returns

A boolean value or expression.

spql.isfinite

Test whether a floating-point value is finite.

  • Kind: scalar function
  • Volatility: immutable
spql.isfinite(value) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
valueyesf16, f32, f64Floating-point value to classify.

Returns

true when the value is neither NaN nor infinite, otherwise false.

spql.isinf

Test whether a floating-point value is infinite.

  • Kind: scalar function
  • Volatility: immutable
spql.isinf(value) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
valueyesf16, f32, f64Floating-point value to classify.

Returns

true when the value is positive or negative infinity, otherwise false.

spql.isnan

Test whether a floating-point value is NaN.

  • Kind: scalar function
  • Volatility: immutable
spql.isnan(value) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
valueyesf16, f32, f64Floating-point value to classify.

Returns

true when the value is NaN, otherwise false.

spql.like

Return whether a UTF8 value matches a SQL LIKE pattern.

  • Kind: scalar function
  • Volatility: immutable
spql.like(value, pattern) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
valueyesutf8Input UTF8 value.
patternyesutf8SQL pattern.

Returns

A boolean value or expression.

spql.lt

Return whether the left value is less than the right value.

  • Kind: scalar function
  • Volatility: immutable
spql.lt(left, right) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesTLeft-hand value.
rightyesTRight-hand value.

Returns

A boolean value or expression.

spql.lte

Return whether the left value is less than or equal to the right value.

  • Kind: scalar function
  • Volatility: immutable
spql.lte(left, right) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesTLeft-hand value.
rightyesTRight-hand value.

Returns

A boolean value or expression.

spql.mul

Multiply two values.

  • Kind: scalar function
  • Volatility: immutable
spql.mul(left, right) -> u8?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu8Left-hand value.
rightyesu8Right-hand value.

Returns

The product as a value or expression.

spql.mul(left, right) -> i8?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi8Left-hand value.
rightyesi8Right-hand value.

Returns

The product as a value or expression.

spql.mul(left, right) -> u16?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu16Left-hand value.
rightyesu16Right-hand value.

Returns

The product as a value or expression.

spql.mul(left, right) -> i16?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi16Left-hand value.
rightyesi16Right-hand value.

Returns

The product as a value or expression.

spql.mul(left, right) -> u32?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu32Left-hand value.
rightyesu32Right-hand value.

Returns

The product as a value or expression.

spql.mul(left, right) -> i32?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi32Left-hand value.
rightyesi32Right-hand value.

Returns

The product as a value or expression.

spql.mul(left, right) -> u64?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu64Left-hand value.
rightyesu64Right-hand value.

Returns

The product as a value or expression.

spql.mul(left, right) -> i64?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi64Left-hand value.
rightyesi64Right-hand value.

Returns

The product as a value or expression.

spql.mul(left, right) -> f16?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesf16Left-hand value.
rightyesf16Right-hand value.

Returns

The product as a value or expression.

spql.mul(left, right) -> f32?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesf32Left-hand value.
rightyesf32Right-hand value.

Returns

The product as a value or expression.

spql.mul(left, right) -> f64?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesf64Left-hand value.
rightyesf64Right-hand value.

Returns

The product as a value or expression.

spql.mul(left, right) -> inferred

The result type and nullability are inferred from the argument types when the call is bound.

Parameters

NameRequiredTypeDescription
leftyesTLeft-hand value.
rightyesTRight-hand value.

Returns

The product as a value or expression.

spql.neq

Return whether two values are not equal.

  • Kind: scalar function
  • Volatility: immutable
spql.neq(left, right) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesTLeft-hand value.
rightyesTRight-hand value.

Returns

A boolean value or expression.

spql.not

Invert a boolean value.

  • Kind: scalar function
  • Volatility: immutable
spql.not(value) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
valueyesboolBoolean value to negate.

Returns

A boolean value or expression.

spql.not_ilike

Return whether a UTF8 value does not match a SQL ILIKE pattern.

  • Kind: scalar function
  • Volatility: immutable
spql.not_ilike(value, pattern) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
valueyesutf8Input UTF8 value.
patternyesutf8SQL pattern.

Returns

A boolean value or expression.

spql.not_like

Return whether a UTF8 value does not match a SQL LIKE pattern.

  • Kind: scalar function
  • Volatility: immutable
spql.not_like(value, pattern) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
valueyesutf8Input UTF8 value.
patternyesutf8SQL pattern.

Returns

A boolean value or expression.

spql.or

Return the boolean disjunction of two values.

  • Kind: scalar function
  • Volatility: immutable
spql.or(left, right) -> bool?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesboolLeft-hand boolean value.
rightyesboolRight-hand boolean value.

Returns

A boolean value or expression.

spql.sub

Subtract the right value from the left value.

  • Kind: scalar function
  • Volatility: immutable
spql.sub(left, right) -> u8?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu8Left-hand value.
rightyesu8Right-hand value.

Returns

The difference as a value or expression.

spql.sub(left, right) -> i8?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi8Left-hand value.
rightyesi8Right-hand value.

Returns

The difference as a value or expression.

spql.sub(left, right) -> u16?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu16Left-hand value.
rightyesu16Right-hand value.

Returns

The difference as a value or expression.

spql.sub(left, right) -> i16?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi16Left-hand value.
rightyesi16Right-hand value.

Returns

The difference as a value or expression.

spql.sub(left, right) -> u32?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu32Left-hand value.
rightyesu32Right-hand value.

Returns

The difference as a value or expression.

spql.sub(left, right) -> i32?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi32Left-hand value.
rightyesi32Right-hand value.

Returns

The difference as a value or expression.

spql.sub(left, right) -> u64?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesu64Left-hand value.
rightyesu64Right-hand value.

Returns

The difference as a value or expression.

spql.sub(left, right) -> i64?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesi64Left-hand value.
rightyesi64Right-hand value.

Returns

The difference as a value or expression.

spql.sub(left, right) -> f16?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesf16Left-hand value.
rightyesf16Right-hand value.

Returns

The difference as a value or expression.

spql.sub(left, right) -> f32?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesf32Left-hand value.
rightyesf32Right-hand value.

Returns

The difference as a value or expression.

spql.sub(left, right) -> f64?

Nullable when an argument is nullable; otherwise non-nullable.

Parameters

NameRequiredTypeDescription
leftyesf64Left-hand value.
rightyesf64Right-hand value.

Returns

The difference as a value or expression.

spql.sub(left, right) -> inferred

The result type and nullability are inferred from the argument types when the call is bound.

Parameters

NameRequiredTypeDescription
leftyesTLeft-hand value.
rightyesTRight-hand value.

Returns

The difference as a value or expression.

spql.sub(left, right) -> inferred

The result type and nullability are inferred from the argument types when the call is bound.

Temporal overloads retain the date or timestamp type, unit and timezone. An Interval applies months first, clamping to the target month's last valid day, then calendar days, then elapsed nanoseconds. Subtraction negates each component and uses the same order. Month clamping is neither associative nor reversible.

Calendar components modify local fields and resolve their combined result once, rejecting repeated or skipped local times before applying elapsed nanoseconds. Zero calendar components preserve the input instant. A Duration is entirely elapsed time. Date results must be whole days; timestamp results must be exact in their retained unit. Null operands propagate null. Overflow and non-null intervals with null components fail.

Parameters

NameRequiredTypeDescription
leftyesvortex.date | vortex.timestampLeft-hand value.
rightyesspql.Interval | spql.DurationRight-hand value.

Returns

The difference as a value or expression.

spql.sub(left, right) -> inferred

The result type and nullability are inferred from the argument types when the call is bound.

Parameters

NameRequiredTypeDescription
leftyesvortex.timestampThe timestamp subtracted from.
rightyesvortex.timestampThe timestamp subtracted.

Returns

The difference as a value or expression.

Found a problem? Edit this page or report an issue.

On this page