object ExpressionEncoder extends Serializable
A factory for constructing encoders that convert objects and primitives to and from the internal row format using catalyst expressions and code generation. By default, the expressions used to retrieve values from an input row when producing an object will be created as follows:
- Classes will have their sub fields extracted by name using UnresolvedAttribute expressions and UnresolvedExtractValue expressions.
- Tuples will have their subfields extracted by position using BoundReference expressions.
- Primitives will have their values extracted from the first ordinal with a schema that defaults
to the name
value.
- Alphabetic
- By Inheritance
- ExpressionEncoder
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class Deserializer[T] extends (InternalRow) => T with Serializable
Function that deserializes an InternalRow into an object of type
T.Function that deserializes an InternalRow into an object of type
T. This class is not thread-safe. - class Serializer[T] extends (T) => InternalRow with Serializable
Function that serializes an object of type
Tto an InternalRow.Function that serializes an object of type
Tto an InternalRow. This class is not thread-safe. Note that multiple calls toapply(..)return the same actual InternalRow object. Thus, the caller should copy the result before making another call if required.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(schema: StructType, lenient: Boolean): ExpressionEncoder[Row]
- def apply(schema: StructType): ExpressionEncoder[Row]
- def apply[T](enc: AgnosticEncoder[T]): ExpressionEncoder[T]
- def apply[T]()(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): ExpressionEncoder[T]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def javaBean[T](beanClass: Class[T]): ExpressionEncoder[T]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def tuple[T1, T2, T3, T4, T5](e1: ExpressionEncoder[T1], e2: ExpressionEncoder[T2], e3: ExpressionEncoder[T3], e4: ExpressionEncoder[T4], e5: ExpressionEncoder[T5]): ExpressionEncoder[(T1, T2, T3, T4, T5)]
- def tuple[T1, T2, T3, T4](e1: ExpressionEncoder[T1], e2: ExpressionEncoder[T2], e3: ExpressionEncoder[T3], e4: ExpressionEncoder[T4]): ExpressionEncoder[(T1, T2, T3, T4)]
- def tuple[T1, T2, T3](e1: ExpressionEncoder[T1], e2: ExpressionEncoder[T2], e3: ExpressionEncoder[T3]): ExpressionEncoder[(T1, T2, T3)]
- def tuple[T1, T2](e1: ExpressionEncoder[T1], e2: ExpressionEncoder[T2]): ExpressionEncoder[(T1, T2)]
- def tuple[T](e: ExpressionEncoder[T]): ExpressionEncoder[(T)]
- def tuple(encoders: Seq[ExpressionEncoder[_]], useNullSafeDeserializer: Boolean = false): ExpressionEncoder[_]
Given a set of N encoders, constructs a new encoder that produce objects as items in an N-tuple.
Given a set of N encoders, constructs a new encoder that produce objects as items in an N-tuple. Note that these encoders should be unresolved so that information about name/positional binding is preserved. When
useNullSafeDeserializeris true, the deserialization result for a child will be null if the input is null. It is false by default as most deserializers handle null input properly and don't require an extra null check. Some of them are null-tolerant, such as the deserializer forOption[T], and we must not set it to true in this case. - final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()