Package org.apache.spark.sql
Class SQLImplicits
Object
org.apache.spark.sql.SQLImplicits
- All Implemented Interfaces:
LowPrioritySQLImplicits
- Direct Known Subclasses:
SparkSession.implicits$
,SQLContext.implicits$
A collection of implicit methods for converting common Scala objects into
Dataset
s.
- Since:
- 1.6.0
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> DatasetHolder<T>
localSeqToDatasetHolder
(scala.collection.Seq<T> s, Encoder<T> evidence$8) Creates aDataset
from a local Seq.Encoder<boolean[]>
Deprecated.Encoder<byte[]>
Deprecated.Encoder<double[]>
Deprecated.Encoder<float[]>
Deprecated.Encoder<int[]>
Deprecated.newJavaEnumEncoder
(scala.reflect.api.TypeTags.TypeTag<A> evidence$1) Encoder<long[]>
Deprecated.<T extends scala.collection.Map<?,
?>>
Encoder<T>newMapEncoder
(scala.reflect.api.TypeTags.TypeTag<T> evidence$4) newProductArrayEncoder
(scala.reflect.api.TypeTags.TypeTag<A> evidence$6) <A extends scala.Product>
Encoder<scala.collection.Seq<A>>newProductSeqEncoder
(scala.reflect.api.TypeTags.TypeTag<A> evidence$2) Deprecated.Encoder<scala.math.BigDecimal>
<T extends scala.collection.Seq<?>>
Encoder<T>newSequenceEncoder
(scala.reflect.api.TypeTags.TypeTag<T> evidence$3) <T extends scala.collection.immutable.Set<?>>
Encoder<T>newSetEncoder
(scala.reflect.api.TypeTags.TypeTag<T> evidence$5) Notice that we serializeSet
to Catalyst array.Encoder<short[]>
Deprecated.Deprecated.<T> DatasetHolder<T>
rddToDatasetHolder
(RDD<T> rdd, Encoder<T> evidence$7) Creates aDataset
from an RDD.symbolToColumn
(scala.Symbol s) An implicit conversion that turns a ScalaSymbol
into aColumn
.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.spark.sql.LowPrioritySQLImplicits
newProductEncoder
-
Constructor Details
-
SQLImplicits
public SQLImplicits()
-
-
Method Details
-
localSeqToDatasetHolder
public <T> DatasetHolder<T> localSeqToDatasetHolder(scala.collection.Seq<T> s, Encoder<T> evidence$8) Creates aDataset
from a local Seq.- Parameters:
s
- (undocumented)evidence$8
- (undocumented)- Returns:
- (undocumented)
- Since:
- 1.6.0
-
newBooleanArrayEncoder
- Since:
- 1.6.1
-
newBooleanEncoder
- Since:
- 1.6.0
-
newBooleanSeqEncoder
Deprecated.- Returns:
- (undocumented)
- Since:
- 1.6.1
-
newBoxedBooleanEncoder
- Since:
- 2.0.0
-
newBoxedByteEncoder
- Since:
- 2.0.0
-
newBoxedDoubleEncoder
- Since:
- 2.0.0
-
newBoxedFloatEncoder
- Since:
- 2.0.0
-
newBoxedIntEncoder
- Since:
- 2.0.0
-
newBoxedLongEncoder
- Since:
- 2.0.0
-
newBoxedShortEncoder
- Since:
- 2.0.0
-
newByteArrayEncoder
- Since:
- 1.6.1
-
newByteEncoder
- Since:
- 1.6.0
-
newByteSeqEncoder
Deprecated.- Returns:
- (undocumented)
- Since:
- 1.6.1
-
newDateEncoder
- Since:
- 2.2.0
-
newDoubleArrayEncoder
- Since:
- 1.6.1
-
newDoubleEncoder
- Since:
- 1.6.0
-
newDoubleSeqEncoder
Deprecated.- Returns:
- (undocumented)
- Since:
- 1.6.1
-
newDurationEncoder
- Since:
- 3.2.0
-
newFloatArrayEncoder
- Since:
- 1.6.1
-
newFloatEncoder
- Since:
- 1.6.0
-
newFloatSeqEncoder
Deprecated.- Returns:
- (undocumented)
- Since:
- 1.6.1
-
newInstantEncoder
- Since:
- 3.0.0
-
newIntArrayEncoder
- Since:
- 1.6.1
-
newIntEncoder
- Since:
- 1.6.0
-
newIntSeqEncoder
Deprecated.- Returns:
- (undocumented)
- Since:
- 1.6.1
-
newJavaDecimalEncoder
- Since:
- 2.2.0
-
newJavaEnumEncoder
public <A extends Enum<?>> Encoder<A> newJavaEnumEncoder(scala.reflect.api.TypeTags.TypeTag<A> evidence$1) - Since:
- 3.2.0
-
newLocalDateEncoder
- Since:
- 3.0.0
-
newLocalDateTimeEncoder
- Since:
- 3.4.0
-
newLongArrayEncoder
- Since:
- 1.6.1
-
newLongEncoder
- Since:
- 1.6.0
-
newLongSeqEncoder
Deprecated.- Returns:
- (undocumented)
- Since:
- 1.6.1
-
newMapEncoder
public <T extends scala.collection.Map<?,?>> Encoder<T> newMapEncoder(scala.reflect.api.TypeTags.TypeTag<T> evidence$4) - Since:
- 2.3.0
-
newPeriodEncoder
- Since:
- 3.2.0
-
newProductArrayEncoder
public <A extends scala.Product> Encoder<Object> newProductArrayEncoder(scala.reflect.api.TypeTags.TypeTag<A> evidence$6) - Since:
- 1.6.1
-
newProductSeqEncoder
public <A extends scala.Product> Encoder<scala.collection.Seq<A>> newProductSeqEncoder(scala.reflect.api.TypeTags.TypeTag<A> evidence$2) Deprecated.- Parameters:
evidence$2
- (undocumented)- Returns:
- (undocumented)
- Since:
- 1.6.1
-
newScalaDecimalEncoder
- Since:
- 2.2.0
-
newSequenceEncoder
public <T extends scala.collection.Seq<?>> Encoder<T> newSequenceEncoder(scala.reflect.api.TypeTags.TypeTag<T> evidence$3) - Since:
- 2.2.0
-
newSetEncoder
public <T extends scala.collection.immutable.Set<?>> Encoder<T> newSetEncoder(scala.reflect.api.TypeTags.TypeTag<T> evidence$5) Notice that we serializeSet
to Catalyst array. The set property is only kept when manipulating the domain objects. The serialization format doesn't keep the set property. When we have a Catalyst array which contains duplicated elements and convert it toDataset[Set[T}
by using the encoder, the elements will be de-duplicated.- Parameters:
evidence$5
- (undocumented)- Returns:
- (undocumented)
- Since:
- 2.3.0
-
newShortArrayEncoder
- Since:
- 1.6.1
-
newShortEncoder
- Since:
- 1.6.0
-
newShortSeqEncoder
Deprecated.- Returns:
- (undocumented)
- Since:
- 1.6.1
-
newStringArrayEncoder
- Since:
- 1.6.1
-
newStringEncoder
- Since:
- 1.6.0
-
newStringSeqEncoder
Deprecated.- Returns:
- (undocumented)
- Since:
- 1.6.1
-
newTimeStampEncoder
- Since:
- 2.2.0
-
rddToDatasetHolder
Creates aDataset
from an RDD.- Parameters:
rdd
- (undocumented)evidence$7
- (undocumented)- Returns:
- (undocumented)
- Since:
- 1.6.0
-
symbolToColumn
An implicit conversion that turns a ScalaSymbol
into aColumn
.- Parameters:
s
- (undocumented)- Returns:
- (undocumented)
- Since:
- 1.3.0
-
<T>newSequenceEncoder(scala.reflect.api.TypeTags.TypeTag<T>)