org.apache.spark.sql.catalyst

expressions

package expressions

A set of classes that can be used to represent trees of relational expressions. A key goal of the expression library is to hide the details of naming and scoping from developers who want to manipulate trees of relational operators. As such, the library defines a special type of expression, a NamedExpression in addition to the standard collection of expressions.

Standard Expressions

A library of standard expressions (e.g., Add, EqualTo), aggregates (e.g., SUM, COUNT), and other computations (e.g. UDFs). Each expression type is capable of determining its output schema as a function of its children's output schema.

Named Expressions

Some expression are named and thus can be referenced by later operators in the dataflow graph. The two types of named expressions are AttributeReferences and Aliases. AttributeReferences refer to attributes of the input tuple for a given operator and form the leaves of some expression trees. Aliases assign a name to intermediate computations. For example, in the SQL statement SELECT a+b AS c FROM ..., the expressions a and b would be represented by AttributeReferences and c would be represented by an Alias.

During analysis, all named expressions are assigned a globally unique expression id, which can be used for equality comparisons. While the original names are kept around for debugging purposes, they should never be used to check if two attributes refer to the same value, as plan transformations can result in the introduction of naming ambiguity. For example, consider a plan that contains subqueries, both of which are reading from the same table. If an optimization removes the subqueries, scoping information would be destroyed, eliminating the ability to reason about which subquery produced a given attribute.

Evaluation

The result of expressions can be evaluated using the Expression.apply(Row) method.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. expressions
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class Abs(child: Expression) extends UnaryExpression with ExpectsInputTypes with Product with Serializable

    A function that get the absolute value of the numeric value.

  2. case class Acos(child: Expression) extends UnaryMathExpression with Product with Serializable

  3. case class Add(left: Expression, right: Expression) extends BinaryArithmetic with Product with Serializable

  4. case class AddMonths(startDate: Expression, numMonths: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns the date that is num_months after start_date.

  5. case class Alias(child: Expression, name: String)(exprId: ExprId = NamedExpression.newExprId, qualifiers: Seq[String] = immutable.this.Nil, explicitMetadata: Option[Metadata] = scala.None) extends UnaryExpression with NamedExpression with Product with Serializable

    Used to assign a new name to a computation.

  6. case class And(left: Expression, right: Expression) extends BinaryOperator with Predicate with Product with Serializable

  7. case class ArrayContains(left: Expression, right: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Checks if the array (left) has the element (right)

  8. case class Ascii(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns the numeric value of the first character of str.

  9. case class Asin(child: Expression) extends UnaryMathExpression with Product with Serializable

  10. case class AssertNotNull(child: Expression, walkedTypePath: Seq[String]) extends UnaryExpression with Product with Serializable

    Asserts that input values of a non-nullable child expression are not null.

  11. case class AtLeastNNonNulls(n: Int, children: Seq[Expression]) extends Expression with Predicate with Product with Serializable

    A predicate that is evaluated to be true if there are at least n non-null and non-NaN values.

  12. case class Atan(child: Expression) extends UnaryMathExpression with Product with Serializable

  13. case class Atan2(left: Expression, right: Expression) extends BinaryMathExpression with Product with Serializable

  14. abstract class Attribute extends LeafExpression with NamedExpression

  15. class AttributeEquals extends AnyRef

    Attributes
    protected
  16. class AttributeMap[A] extends Map[Attribute, A] with Serializable

  17. case class AttributeReference(name: String, dataType: DataType, nullable: Boolean = true, metadata: Metadata = ...)(exprId: ExprId = NamedExpression.newExprId, qualifiers: Seq[String] = immutable.this.Nil) extends Attribute with Unevaluable with Product with Serializable

    A reference to an attribute produced by another operator in the tree.

  18. implicit class AttributeSeq extends AnyRef

    Helper functions for working with Seq[Attribute].

  19. class AttributeSet extends Traversable[Attribute] with Serializable

    A Set designed to hold AttributeReference objects, that performs equality checking using expression id instead of standard java equality.

  20. case class Base64(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

    Converts the argument from binary to a base 64 string.

  21. trait BaseGenericInternalRow extends InternalRow

    An extended version of InternalRow that implements all special getters, toString and equals/hashCode by genericGet.

  22. case class Bin(child: Expression) extends UnaryExpression with Serializable with ImplicitCastInputTypes with Product

  23. abstract class BinaryArithmetic extends BinaryOperator

  24. abstract class BinaryComparison extends BinaryOperator with Predicate

  25. abstract class BinaryExpression extends Expression

    An expression with two inputs and one output.

  26. abstract class BinaryMathExpression extends BinaryExpression with Serializable with ImplicitCastInputTypes

    A binary expression specifically for math functions that take two Doubles as input and returns a Double.

  27. abstract class BinaryOperator extends BinaryExpression with ExpectsInputTypes

    A BinaryExpression that is an operator, with two properties:

  28. case class BitwiseAnd(left: Expression, right: Expression) extends BinaryArithmetic with Product with Serializable

    A function that calculates bitwise and(&) of two numbers.

  29. case class BitwiseNot(child: Expression) extends UnaryExpression with ExpectsInputTypes with Product with Serializable

    A function that calculates bitwise not(~) of a number.

  30. case class BitwiseOr(left: Expression, right: Expression) extends BinaryArithmetic with Product with Serializable

    A function that calculates bitwise or(|) of two numbers.

  31. case class BitwiseXor(left: Expression, right: Expression) extends BinaryArithmetic with Product with Serializable

    A function that calculates bitwise xor of two numbers.

  32. case class BoundReference(ordinal: Int, dataType: DataType, nullable: Boolean) extends LeafExpression with NamedExpression with Product with Serializable

    A bound reference points to a specific slot in the input tuple, allowing the actual value to be retrieved more efficiently.

  33. case class CaseKeyWhen(key: Expression, branches: Seq[Expression]) extends Expression with CaseWhenLike with Product with Serializable

    Case statements of the form "CASE a WHEN b THEN c [WHEN d THEN e]* [ELSE f] END".

  34. case class CaseWhen(branches: Seq[Expression]) extends Expression with CaseWhenLike with Product with Serializable

    Case statements of the form "CASE WHEN a THEN b [WHEN c THEN d]* [ELSE e] END".

  35. trait CaseWhenLike extends Expression

  36. case class Cast(child: Expression, dataType: DataType) extends UnaryExpression with CodegenFallback with Product with Serializable

    Cast the child expression to the target data type.

  37. case class Cbrt(child: Expression) extends UnaryMathExpression with Product with Serializable

  38. case class Ceil(child: Expression) extends UnaryMathExpression with Product with Serializable

  39. case class CheckOverflow(child: Expression, dataType: DecimalType) extends UnaryExpression with Product with Serializable

    Rounds the decimal to given scale and check whether the decimal can fit in provided precision or not, returns null if not.

  40. case class Coalesce(children: Seq[Expression]) extends Expression with Product with Serializable

    An expression that is evaluated to the first non-null input.

  41. case class Concat(children: Seq[Expression]) extends Expression with ImplicitCastInputTypes with Product with Serializable

    An expression that concatenates multiple input strings into a single string.

  42. case class ConcatWs(children: Seq[Expression]) extends Expression with ImplicitCastInputTypes with Product with Serializable

    An expression that concatenates multiple input strings or array of strings into a single string, using a given separator (the first child).

  43. case class Contains(left: Expression, right: Expression) extends BinaryExpression with StringPredicate with Product with Serializable

    A function that returns true if the string left contains the string right.

  44. case class Conv(numExpr: Expression, fromBaseExpr: Expression, toBaseExpr: Expression) extends TernaryExpression with ImplicitCastInputTypes with Product with Serializable

    Convert a num from one base to another

  45. case class Cos(child: Expression) extends UnaryMathExpression with Product with Serializable

  46. case class Cosh(child: Expression) extends UnaryMathExpression with Product with Serializable

  47. case class Crc32(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

    A function that computes a cyclic redundancy check value and returns it as a bigint For input of type BinaryType

  48. case class CreateArray(children: Seq[Expression]) extends Expression with Product with Serializable

    Returns an Array containing the evaluation of all children expressions.

  49. case class CreateExternalRow(children: Seq[Expression]) extends Expression with Product with Serializable

    Constructs a new external row, using the result of evaluating the specified expressions as content.

  50. case class CreateNamedStruct(children: Seq[Expression]) extends Expression with Product with Serializable

    Creates a struct with the given field names and values

  51. case class CreateNamedStructUnsafe(children: Seq[Expression]) extends Expression with Product with Serializable

    Creates a struct with the given field names and values.

  52. case class CreateStruct(children: Seq[Expression]) extends Expression with Product with Serializable

    Returns a Row containing the evaluation of all children expressions.

  53. case class CreateStructUnsafe(children: Seq[Expression]) extends Expression with Product with Serializable

    Returns a Row containing the evaluation of all children expressions.

  54. case class CurrentDate() extends LeafExpression with CodegenFallback with Product with Serializable

    Returns the current date at the start of query evaluation.

  55. case class CurrentTimestamp() extends LeafExpression with CodegenFallback with Product with Serializable

    Returns the current timestamp at the start of query evaluation.

  56. case class DateAdd(startDate: Expression, days: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Adds a number of days to startdate.

  57. case class DateDiff(endDate: Expression, startDate: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns the number of days from startDate to endDate.

  58. case class DateFormatClass(left: Expression, right: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

  59. case class DateSub(startDate: Expression, days: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Subtracts a number of days to startdate.

  60. case class DayOfMonth(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

  61. case class DayOfYear(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

  62. case class Decode(bin: Expression, charset: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Decodes the first argument into a String using the provided character set (one of 'US-ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16BE', 'UTF-16LE', 'UTF-16').

  63. case class DecodeUsingSerializer[T](child: Expression, tag: ClassTag[T], kryo: Boolean) extends UnaryExpression with Product with Serializable

    Serializes an input object using a generic serializer (Kryo or Java).

  64. case class Divide(left: Expression, right: Expression) extends BinaryArithmetic with Product with Serializable

  65. case class Encode(value: Expression, charset: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Encodes the first argument into a BINARY using the provided character set (one of 'US-ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16BE', 'UTF-16LE', 'UTF-16').

  66. case class EncodeUsingSerializer(child: Expression, kryo: Boolean) extends UnaryExpression with Product with Serializable

    Serializes an input object using a generic serializer (Kryo or Java).

  67. case class EndsWith(left: Expression, right: Expression) extends BinaryExpression with StringPredicate with Product with Serializable

    A function that returns true if the string left ends with the string right.

  68. case class EqualNullSafe(left: Expression, right: Expression) extends BinaryComparison with Product with Serializable

  69. case class EqualTo(left: Expression, right: Expression) extends BinaryComparison with Product with Serializable

  70. class EquivalentExpressions extends AnyRef

    This class is used to compute equality of (sub)expression trees.

  71. case class EulerNumber() extends LeafMathExpression with Product with Serializable

    Euler's number.

  72. case class Exp(child: Expression) extends UnaryMathExpression with Product with Serializable

  73. trait ExpectsInputTypes extends Expression

    An trait that gets mixin to define the expected input types of an expression.

  74. case class Explode(child: Expression) extends UnaryExpression with Generator with CodegenFallback with Product with Serializable

    Given an input array produces a sequence of rows for each value in the array.

  75. case class Expm1(child: Expression) extends UnaryMathExpression with Product with Serializable

  76. case class ExprId(id: Long, jvmId: UUID) extends Product with Serializable

    A globally unique id for a given named expression.

  77. abstract class Expression extends TreeNode[Expression]

    An expression in Catalyst.

  78. class ExpressionDescription extends Annotation with Annotation with ClassfileAnnotation

  79. class ExpressionInfo extends AnyRef

  80. case class Factorial(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

  81. case class FindInSet(left: Expression, right: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    A function that returns the index (1-based) of the given string (left) in the comma- delimited list (right).

  82. case class Floor(child: Expression) extends UnaryMathExpression with Product with Serializable

  83. case class FormatNumber(x: Expression, d: Expression) extends BinaryExpression with ExpectsInputTypes with Product with Serializable

    Formats the number X to a format like '#,###,###.

  84. case class FormatString(children: Expression*) extends Expression with ImplicitCastInputTypes with Product with Serializable

    Returns the input formatted according do printf-style format strings

  85. sealed trait FrameBoundary extends AnyRef

    The trait used to represent the type of a Window Frame Boundary.

  86. sealed trait FrameType extends AnyRef

    The trait used to represent the type of a Window Frame.

  87. case class FromUTCTimestamp(left: Expression, right: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Assumes given timestamp is UTC and converts to given timezone.

  88. case class FromUnixTime(sec: Expression, format: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Converts the number of seconds from unix epoch (1970-01-01 00:00:00 UTC) to a string representing the timestamp of that moment in the current system time zone in the given format.

  89. trait Generator extends Expression

    An expression that produces zero or more rows given a single input row.

  90. class GenericInternalRow extends InternalRow with BaseGenericInternalRow

    A internal row implementation that uses an array of objects as the underlying storage.

  91. class GenericInternalRowWithSchema extends GenericInternalRow

    This is used for serialization of Python DataFrame

  92. class GenericMutableRow extends MutableRow with BaseGenericInternalRow

  93. class GenericRow extends Row

    A row implementation that uses an array of objects as the underlying storage.

  94. class GenericRowWithSchema extends GenericRow

  95. case class GetArrayItem(child: Expression, ordinal: Expression) extends BinaryExpression with ExpectsInputTypes with Product with Serializable

    Returns the field at ordinal in the Array child.

  96. case class GetArrayStructFields(child: Expression, field: StructField, ordinal: Int, numFields: Int, containsNull: Boolean) extends UnaryExpression with Product with Serializable

    Returns the array of value of fields in the Array of Struct child.

  97. case class GetJsonObject(json: Expression, path: Expression) extends BinaryExpression with ExpectsInputTypes with CodegenFallback with Product with Serializable

    Extracts json object from a json string based on json path specified, and returns json string of the extracted json object.

  98. case class GetMapValue(child: Expression, key: Expression) extends BinaryExpression with ExpectsInputTypes with Product with Serializable

    Returns the value of key key in Map child.

  99. case class GetStructField(child: Expression, ordinal: Int, name: Option[String] = scala.None) extends UnaryExpression with Product with Serializable

    Returns the value of fields in the Struct child.

  100. case class GreaterThan(left: Expression, right: Expression) extends BinaryComparison with Product with Serializable

  101. case class GreaterThanOrEqual(left: Expression, right: Expression) extends BinaryComparison with Product with Serializable

  102. case class Greatest(children: Seq[Expression]) extends Expression with Product with Serializable

    A function that returns the greatest value of all parameters, skipping null values.

  103. case class Hex(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

    If the argument is an INT or binary, hex returns the number as a STRING in hexadecimal format.

  104. case class Hour(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

  105. case class Hypot(left: Expression, right: Expression) extends BinaryMathExpression with Product with Serializable

  106. case class If(predicate: Expression, trueValue: Expression, falseValue: Expression) extends Expression with Product with Serializable

  107. trait ImplicitCastInputTypes extends Expression with ExpectsInputTypes

    A mixin for the analyzer to perform implicit type casting using ImplicitTypeCasts.

  108. case class In(value: Expression, list: Seq[Expression]) extends Expression with Predicate with ImplicitCastInputTypes with Product with Serializable

    Evaluates to true if list contains value.

  109. case class InSet(child: Expression, hset: Set[Any]) extends UnaryExpression with Predicate with Product with Serializable

    Optimized version of In clause, when all filter values of In clause are static.

  110. case class InitCap(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns string, with the first letter of each word in uppercase.

  111. case class InitializeJavaBean(beanInstance: Expression, setters: Map[String, Expression]) extends Expression with Product with Serializable

    Initialize a Java Bean instance by setting its field values via setters.

  112. case class InputFileName() extends LeafExpression with Nondeterministic with Product with Serializable

    Expression that returns the name of the current file being read in using SqlNewHadoopRDD

  113. case class InterpretedMutableProjection(expressions: Seq[Expression]) extends MutableProjection with Product with Serializable

    A MutableProjection that is calculated by calling eval on each of the specified expressions.

  114. class InterpretedOrdering extends Ordering[InternalRow]

    An interpreted row ordering comparator.

  115. class InterpretedProjection extends Projection

    A Projection that is calculated by calling the eval of each of the specified expressions.

  116. case class Invoke(targetObject: Expression, functionName: String, dataType: DataType, arguments: Seq[Expression] = immutable.this.Nil) extends Expression with Product with Serializable

    Calls the specified function on an object, optionally passing arguments.

  117. case class IsNaN(child: Expression) extends UnaryExpression with Predicate with ImplicitCastInputTypes with Product with Serializable

    Evaluates to true iff it's NaN.

  118. case class IsNotNull(child: Expression) extends UnaryExpression with Predicate with Product with Serializable

    An expression that is evaluated to true if the input is not null.

  119. case class IsNull(child: Expression) extends UnaryExpression with Predicate with Product with Serializable

    An expression that is evaluated to true if the input is null.

  120. class JoinedRow extends InternalRow

    A mutable wrapper that makes two rows appear as a single concatenated row.

  121. case class JsonTuple(children: Seq[Expression]) extends Expression with Generator with CodegenFallback with Product with Serializable

  122. case class LambdaVariable(value: String, isNull: String, dataType: DataType) extends LeafExpression with Unevaluable with Product with Serializable

    A place holder for the loop variable used in MapObjects.

  123. case class LastDay(startDate: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns the last day of the month which the date belongs to.

  124. abstract class LeafExpression extends Expression

    A leaf expression, i.

  125. abstract class LeafMathExpression extends LeafExpression with CodegenFallback

    A leaf expression specifically for math constants.

  126. case class Least(children: Seq[Expression]) extends Expression with Product with Serializable

    A function that returns the least value of all parameters, skipping null values.

  127. case class Length(child: Expression) extends UnaryExpression with ExpectsInputTypes with Product with Serializable

    A function that return the length of the given string or binary expression.

  128. case class LessThan(left: Expression, right: Expression) extends BinaryComparison with Product with Serializable

  129. case class LessThanOrEqual(left: Expression, right: Expression) extends BinaryComparison with Product with Serializable

  130. case class Levenshtein(left: Expression, right: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    A function that return the Levenshtein distance between the two given strings.

  131. case class Like(left: Expression, right: Expression) extends BinaryExpression with StringRegexExpression with CodegenFallback with Product with Serializable

    Simple RegEx pattern matching function

  132. case class Literal(value: Any, dataType: DataType) extends LeafExpression with CodegenFallback with Product with Serializable

    In order to do type checking, use Literal.

  133. case class Log(child: Expression) extends UnaryLogExpression with Product with Serializable

  134. case class Log10(child: Expression) extends UnaryLogExpression with Product with Serializable

  135. case class Log1p(child: Expression) extends UnaryLogExpression with Product with Serializable

  136. case class Log2(child: Expression) extends UnaryLogExpression with Product with Serializable

  137. case class Logarithm(left: Expression, right: Expression) extends BinaryMathExpression with Product with Serializable

    Computes the logarithm of a number.

  138. case class Lower(child: Expression) extends UnaryExpression with String2StringExpression with Product with Serializable

    A function that converts the characters of a string to lowercase.

  139. case class MakeDecimal(child: Expression, precision: Int, scale: Int) extends UnaryExpression with Product with Serializable

    Create a Decimal from an unscaled Long value.

  140. case class MapObjects extends Expression with Product with Serializable

    Applies the given expression to every element of a collection of items, returning the result as an ArrayType.

  141. case class MaxOf(left: Expression, right: Expression) extends BinaryArithmetic with Product with Serializable

  142. case class Md5(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

    A function that calculates an MD5 128-bit checksum and returns it as a hex string For input of type BinaryType

  143. case class MinOf(left: Expression, right: Expression) extends BinaryArithmetic with Product with Serializable

  144. case class Minute(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

  145. case class Month(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

  146. case class MonthsBetween(date1: Expression, date2: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns number of months between dates date1 and date2.

  147. case class Multiply(left: Expression, right: Expression) extends BinaryArithmetic with Product with Serializable

  148. final class MutableAny extends MutableValue

  149. final class MutableBoolean extends MutableValue

  150. final class MutableByte extends MutableValue

  151. final class MutableDouble extends MutableValue

  152. final class MutableFloat extends MutableValue

  153. final class MutableInt extends MutableValue

  154. case class MutableLiteral(value: Any, dataType: DataType, nullable: Boolean = true) extends LeafExpression with CodegenFallback with Product with Serializable

  155. final class MutableLong extends MutableValue

  156. abstract class MutableProjection extends Projection

    Converts a InternalRow to another Row given a sequence of expression that define each column of the new row.

  157. abstract class MutableRow extends InternalRow

    An extended interface to InternalRow that allows the values for each column to be updated.

  158. final class MutableShort extends MutableValue

  159. abstract class MutableValue extends Serializable

    A parent class for mutable container objects that are reused when the values are changed, resulting in less garbage.

  160. case class NaNvl(left: Expression, right: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    An Expression evaluates to left iff it's not NaN, or evaluates to right otherwise.

  161. trait NamedExpression extends Expression

    An Expression that is named.

  162. case class NewInstance(cls: Class[_], arguments: Seq[Expression], propagateNull: Boolean, dataType: DataType, outerPointer: Option[Literal]) extends Expression with Product with Serializable

    Constructs a new instance of the given class, using the result of evaluating the specified expressions as arguments.

  163. case class NextDay(startDate: Expression, dayOfWeek: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns the first date which is later than startDate and named as dayOfWeek.

  164. trait Nondeterministic extends Expression

    An expression that is nondeterministic.

  165. case class Not(child: Expression) extends UnaryExpression with Predicate with ImplicitCastInputTypes with Product with Serializable

  166. case class Or(left: Expression, right: Expression) extends BinaryOperator with Predicate with Product with Serializable

  167. case class Pi() extends LeafMathExpression with Product with Serializable

    Pi.

  168. case class Pmod(left: Expression, right: Expression) extends BinaryArithmetic with Product with Serializable

  169. case class Pow(left: Expression, right: Expression) extends BinaryMathExpression with Product with Serializable

  170. trait Predicate extends Expression

    An Expression that returns a boolean value.

  171. trait PredicateHelper extends AnyRef

  172. case class PrettyAttribute(name: String, dataType: DataType = org.apache.spark.sql.types.NullType) extends Attribute with Unevaluable with Product with Serializable

    A place holder used when printing expressions without debugging information such as the expression id or the unresolved indicator.

  173. abstract class Projection extends (InternalRow) ⇒ InternalRow

    Converts a InternalRow to another Row given a sequence of expression that define each column of the new row.

  174. case class PromotePrecision(child: Expression) extends UnaryExpression with Product with Serializable

    An expression used to wrap the children when promote the precision of DecimalType to avoid promote multiple times.

  175. case class Quarter(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

  176. abstract class RDG extends LeafExpression with Nondeterministic

    A Random distribution generating expression.

  177. case class RLike(left: Expression, right: Expression) extends BinaryExpression with StringRegexExpression with CodegenFallback with Product with Serializable

  178. case class Rand(seed: Long) extends RDG with Product with Serializable

    Generate a random column with i.

  179. case class Randn(seed: Long) extends RDG with Product with Serializable

    Generate a random column with i.

  180. case class RegExpExtract(subject: Expression, regexp: Expression, idx: Expression) extends TernaryExpression with ImplicitCastInputTypes with Product with Serializable

    Extract a specific(idx) group identified by a Java regex.

  181. case class RegExpReplace(subject: Expression, regexp: Expression, rep: Expression) extends TernaryExpression with ImplicitCastInputTypes with Product with Serializable

    Replace all substrings of str that match regexp with rep.

  182. case class Remainder(left: Expression, right: Expression) extends BinaryArithmetic with Product with Serializable

  183. case class Rint(child: Expression) extends UnaryMathExpression with Product with Serializable

  184. case class Round(child: Expression, scale: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Round the child's result to scale decimal place when scale >= 0 or round at integral part when scale < 0.

  185. case class ScalaUDF(function: AnyRef, dataType: DataType, children: Seq[Expression], inputTypes: Seq[DataType] = immutable.this.Nil) extends Expression with ImplicitCastInputTypes with Product with Serializable

    User-defined function.

  186. case class Second(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

  187. case class Sha1(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

    A function that calculates a sha1 hash value and returns it as a hex string For input of type BinaryType or StringType

  188. case class Sha2(left: Expression, right: Expression) extends BinaryExpression with Serializable with ImplicitCastInputTypes with Product

    A function that calculates the SHA-2 family of functions (SHA-224, SHA-256, SHA-384, and SHA-512) and returns it as a hex string.

  189. case class ShiftLeft(left: Expression, right: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Bitwise unsigned left shift.

  190. case class ShiftRight(left: Expression, right: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Bitwise unsigned left shift.

  191. case class ShiftRightUnsigned(left: Expression, right: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Bitwise unsigned right shift, for integer and long data type.

  192. case class Signum(child: Expression) extends UnaryMathExpression with Product with Serializable

  193. case class Sin(child: Expression) extends UnaryMathExpression with Product with Serializable

  194. case class Sinh(child: Expression) extends UnaryMathExpression with Product with Serializable

  195. case class Size(child: Expression) extends UnaryExpression with ExpectsInputTypes with Product with Serializable

    Given an array or map, returns its size.

  196. case class SortArray(base: Expression, ascendingOrder: Expression) extends BinaryExpression with ExpectsInputTypes with CodegenFallback with Product with Serializable

    Sorts the input array in ascending / descending order according to the natural ordering of the array elements and returns it.

  197. sealed abstract class SortDirection extends AnyRef

  198. case class SortOrder(child: Expression, direction: SortDirection) extends UnaryExpression with Unevaluable with Product with Serializable

    An expression that can be used to sort a tuple.

  199. case class SortPrefix(child: SortOrder) extends UnaryExpression with Product with Serializable

    An expression to generate a 64-bit long prefix used in sorting.

  200. case class SoundEx(child: Expression) extends UnaryExpression with ExpectsInputTypes with Product with Serializable

    A function that return soundex code of the given string expression.

  201. trait SpecializedGetters extends AnyRef

  202. class SpecificMutableRow extends MutableRow with BaseGenericInternalRow

    A row type that holds an array specialized container objects, of type MutableValue, chosen based on the dataTypes of each column.

  203. case class SpecifiedWindowFrame(frameType: FrameType, frameStart: FrameBoundary, frameEnd: FrameBoundary) extends WindowFrame with Product with Serializable

    A specified Window Frame.

  204. case class Sqrt(child: Expression) extends UnaryMathExpression with Product with Serializable

  205. case class StartsWith(left: Expression, right: Expression) extends BinaryExpression with StringPredicate with Product with Serializable

    A function that returns true if the string left starts with the string right.

  206. case class StaticInvoke(staticObject: Class[_], dataType: DataType, functionName: String, arguments: Seq[Expression] = immutable.this.Nil, propagateNull: Boolean = true) extends Expression with Product with Serializable

    Invokes a static function, returning the result.

  207. trait String2StringExpression extends Expression with ImplicitCastInputTypes

  208. case class StringInstr(str: Expression, substr: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    A function that returns the position of the first occurrence of substr in the given string.

  209. case class StringLPad(str: Expression, len: Expression, pad: Expression) extends TernaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns str, left-padded with pad to a length of len.

  210. case class StringLocate(substr: Expression, str: Expression, start: Expression) extends TernaryExpression with ImplicitCastInputTypes with Product with Serializable

    A function that returns the position of the first occurrence of substr in given string after position pos.

  211. trait StringPredicate extends Expression with Predicate with ImplicitCastInputTypes

    A base trait for functions that compare two strings, returning a boolean.

  212. case class StringRPad(str: Expression, len: Expression, pad: Expression) extends TernaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns str, right-padded with pad to a length of len.

  213. trait StringRegexExpression extends Expression with ImplicitCastInputTypes

  214. case class StringRepeat(str: Expression, times: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns the string which repeat the given string value n times.

  215. case class StringReverse(child: Expression) extends UnaryExpression with String2StringExpression with Product with Serializable

    Returns the reversed given string.

  216. case class StringSpace(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns a n spaces string.

  217. case class StringSplit(str: Expression, pattern: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Splits str around pat (pattern is a regular expression).

  218. case class StringTranslate(srcExpr: Expression, matchingExpr: Expression, replaceExpr: Expression) extends TernaryExpression with ImplicitCastInputTypes with Product with Serializable

    A function translate any character in the srcExpr by a character in replaceExpr.

  219. case class StringTrim(child: Expression) extends UnaryExpression with String2StringExpression with Product with Serializable

    A function that trim the spaces from both ends for the specified string.

  220. case class StringTrimLeft(child: Expression) extends UnaryExpression with String2StringExpression with Product with Serializable

    A function that trim the spaces from left end for given string.

  221. case class StringTrimRight(child: Expression) extends UnaryExpression with String2StringExpression with Product with Serializable

    A function that trim the spaces from right end for given string.

  222. case class Substring(str: Expression, pos: Expression, len: Expression) extends TernaryExpression with ImplicitCastInputTypes with Product with Serializable

    A function that takes a substring of its first argument starting at a given position.

  223. case class SubstringIndex(strExpr: Expression, delimExpr: Expression, countExpr: Expression) extends TernaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns the substring from string str before count occurrences of the delimiter delim.

  224. case class Subtract(left: Expression, right: Expression) extends BinaryArithmetic with Product with Serializable

  225. case class Tan(child: Expression) extends UnaryMathExpression with Product with Serializable

  226. case class Tanh(child: Expression) extends UnaryMathExpression with Product with Serializable

  227. abstract class TernaryExpression extends Expression

    An expression with three inputs and one output.

  228. case class TimeAdd(start: Expression, interval: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Adds an interval to timestamp.

  229. case class TimeSub(start: Expression, interval: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Subtracts an interval from timestamp.

  230. case class ToDate(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns the date part of a timestamp or string.

  231. case class ToDegrees(child: Expression) extends UnaryMathExpression with Product with Serializable

  232. case class ToRadians(child: Expression) extends UnaryMathExpression with Product with Serializable

  233. case class ToUTCTimestamp(left: Expression, right: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Assumes given timestamp is in given timezone and converts to UTC.

  234. case class ToUnixTimestamp(timeExp: Expression, format: Expression) extends UnixTime with Product with Serializable

    Converts time string with given pattern.

  235. case class TruncDate(date: Expression, format: Expression) extends BinaryExpression with ImplicitCastInputTypes with Product with Serializable

    Returns date truncated to the unit specified by the format.

  236. case class UnBase64(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

    Converts the argument from a base 64 string to BINARY.

  237. abstract class UnaryExpression extends Expression

    An expression with one input and one output.

  238. abstract class UnaryLogExpression extends UnaryMathExpression

  239. abstract class UnaryMathExpression extends UnaryExpression with Serializable with ImplicitCastInputTypes

    A unary expression specifically for math functions.

  240. case class UnaryMinus(child: Expression) extends UnaryExpression with ExpectsInputTypes with Product with Serializable

  241. case class UnaryPositive(child: Expression) extends UnaryExpression with ExpectsInputTypes with Product with Serializable

  242. trait Unevaluable extends Expression

    An expression that cannot be evaluated.

  243. case class Unhex(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

    Performs the inverse operation of HEX.

  244. abstract class UnixTime extends BinaryExpression with ExpectsInputTypes

  245. case class UnixTimestamp(timeExp: Expression, format: Expression) extends UnixTime with Product with Serializable

    Converts time string with given pattern.

  246. case class UnresolvedWindowExpression(child: UnresolvedWindowFunction, windowSpec: WindowSpecReference) extends UnaryExpression with Unevaluable with Product with Serializable

  247. case class UnresolvedWindowFunction(name: String, children: Seq[Expression]) extends Expression with WindowFunction with Unevaluable with Product with Serializable

  248. class UnsafeArrayData extends ArrayData

  249. class UnsafeMapData extends MapData

  250. abstract class UnsafeProjection extends Projection

    A projection that returns UnsafeRow.

  251. final class UnsafeRow extends MutableRow with Externalizable with KryoSerializable

  252. case class UnscaledValue(child: Expression) extends UnaryExpression with Product with Serializable

    Return the unscaled Long value of a Decimal, assuming it fits in a Long.

  253. case class UnwrapOption(dataType: DataType, child: Expression) extends UnaryExpression with ExpectsInputTypes with Product with Serializable

    Given an expression that returns on object of type Option[_], this expression unwraps the option into the specified Spark SQL datatype.

  254. case class UpCast(child: Expression, dataType: DataType, walkedTypePath: Seq[String]) extends UnaryExpression with Unevaluable with Product with Serializable

    Cast the child expression to the target data type, but will throw error if the cast might truncate, e.

  255. case class Upper(child: Expression) extends UnaryExpression with String2StringExpression with Product with Serializable

    A function that converts the characters of a string to uppercase.

  256. case class UserDefinedGenerator(elementTypes: Seq[(DataType, Boolean, String)], function: (Row) ⇒ TraversableOnce[InternalRow], children: Seq[Expression]) extends Expression with Generator with CodegenFallback with Product with Serializable

    A generator that produces its output using the provided lambda function.

  257. case class ValueFollowing(value: Int) extends FrameBoundary with Product with Serializable

    <value> FOLLOWING boundary.

  258. case class ValuePreceding(value: Int) extends FrameBoundary with Product with Serializable

    <value> PRECEDING boundary.

  259. case class WeekOfYear(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

  260. case class WindowExpression(windowFunction: WindowFunction, windowSpec: WindowSpecDefinition) extends Expression with Unevaluable with Product with Serializable

  261. sealed trait WindowFrame extends AnyRef

    The trait used to represent the a Window Frame.

  262. trait WindowFunction extends Expression

    Every window function needs to maintain a output buffer for its output.

  263. sealed trait WindowSpec extends AnyRef

    The trait of the Window Specification (specified in the OVER clause or WINDOW clause) for Window Functions.

  264. case class WindowSpecDefinition(partitionSpec: Seq[Expression], orderSpec: Seq[SortOrder], frameSpecification: WindowFrame) extends Expression with WindowSpec with Unevaluable with Product with Serializable

    The specification for a window function.

  265. case class WindowSpecReference(name: String) extends WindowSpec with Product with Serializable

    A Window specification reference that refers to the WindowSpecDefinition defined under the name name.

  266. case class WrapOption(child: Expression, optType: DataType) extends UnaryExpression with ExpectsInputTypes with Product with Serializable

    Converts the result of evaluating child into an option, checking both the isNull bit and (in the case of reference types) equality with null.

  267. case class Year(child: Expression) extends UnaryExpression with ImplicitCastInputTypes with Product with Serializable

Value Members

  1. object Ascending extends SortDirection with Product with Serializable

  2. object AttributeMap extends Serializable

    Builds a map that is keyed by an Attribute's expression id.

  3. object AttributeSet extends Serializable

  4. object BindReferences extends Logging

  5. object Cast extends Serializable

  6. object CurrentRow extends FrameBoundary with Product with Serializable

    CURRENT ROW boundary.

  7. object Descending extends SortDirection with Product with Serializable

  8. val EmptyRow: InternalRow

    Used as input into expressions whose output does not depend on any input value.

  9. object ExprId extends Serializable

  10. object ExtractValue

  11. object Factorial extends Serializable

  12. object FrameBoundaryExtractor

    Extractor for making working with frame boundaries easier.

  13. object FromUnsafeProjection

    A projection that could turn UnsafeRow into GenericInternalRow

  14. object Hex extends Serializable

  15. object IntegerLiteral

    Extractor for retrieving Int literals.

  16. object InterpretedOrdering extends Serializable

  17. object InterpretedPredicate

  18. object Literal extends Serializable

  19. object MapObjects extends Serializable

  20. object NamedExpression

  21. object NewInstance extends Serializable

  22. object NonNullLiteral

    An extractor that matches non-null literal values

  23. object RangeFrame extends FrameType with Product with Serializable

    RangeFrame treats rows in a partition as groups of peers.

  24. object RowFrame extends FrameType with Product with Serializable

    RowFrame treats rows in a partition individually.

  25. object RowOrdering

  26. object SpecifiedWindowFrame extends Serializable

  27. object StringTranslate extends Serializable

  28. object UnboundedFollowing extends FrameBoundary with Product with Serializable

    UNBOUNDED FOLLOWING boundary.

  29. object UnboundedPreceding extends FrameBoundary with Product with Serializable

    UNBOUNDED PRECEDING boundary.

  30. object UnsafeProjection

  31. object UnspecifiedFrame extends WindowFrame with Product with Serializable

    Used as a place holder when a frame specification is not defined.

  32. object VirtualColumn

  33. package aggregate

  34. package codegen

    A collection of generators that build custom bytecode at runtime for performing the evaluation of catalyst expression.

Inherited from AnyRef

Inherited from Any

Ungrouped