Package io.delta.kernel.expressions
Class ScalarExpression
Object
io.delta.kernel.expressions.ScalarExpression
- All Implemented Interfaces:
Expression
- Direct Known Subclasses:
Predicate
Scalar SQL expressions which take zero or more inputs and for each input row generate one output
value. A subclass of these expressions are of type
Predicate
whose result type is
`boolean`. See Predicate
for predicate type scalar expressions. Supported non-predicate
type scalar expressions are listed below.
- Name:
element_at
- Semantic:
element_at(map, key)
. Return the value of given key from the map type input. Returns null if the given key is not in the map Ex: `element_at(map(1, 'a', 2, 'b'), 2)` returns 'b' - Since version: 3.0.0
- Semantic:
- Name:
COALESCE
- Semantic:
COALESCE(expr1, ..., exprN)
Return the first non-null argument. If all arguments are null returns null - Since version: 3.1.0
- Semantic:
- Name:
TIMEADD
- Semantic:
TIMEADD(colExpr, milliseconds)
. Add the specified number of milliseconds to the timestamp represented by colExpr. The adjustment does not alter the original value but returns a new timestamp increased by the given milliseconds. Ex: `TIMEADD(timestampColumn, 1000)` returns a timestamp 1 second later. - Since version: 3.3.0
- Semantic:
- Name:
SUBSTRING
- Semantic:
SUBSTRING(colExpr, pos, len)
. Returns the slice of byte array or string, that starts at pos and has the length len.- pos is 1 based. If pos is negative the start is determined by counting characters (or bytes for BINARY) from the end.
- If len is less than 1 the result is empty.
- If len is omitted the function returns on characters or bytes starting with pos.
- Since version: 3.4.0
- Semantic:
- Since:
- 3.0.0
-
Constructor Details
-
ScalarExpression
-
-
Method Details
-
toString
-
getName
-
getChildren
- Specified by:
getChildren
in interfaceExpression
- Returns:
- a list of expressions that are input to this expression.
-