KeyValueGroupedDataset (Spark 3.5.5 JavaDoc) (original) (raw)

Modifier and Type

Method and Description

<U1> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<scala.Tuple2<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1>>

[agg](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#agg-org.apache.spark.sql.TypedColumn-)([TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1> col1)

Computes the given aggregation, returning a Dataset of tuples for each unique key and the result of computing this aggregation over all elements in the group.

<U1,U2> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<scala.Tuple3<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1,U2>>

[agg](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#agg-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-)([TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1> col1,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U2> col2)

Computes the given aggregations, returning a Dataset of tuples for each unique key and the result of computing these aggregations over all elements in the group.

<U1,U2,U3> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<scala.Tuple4<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1,U2,U3>>

[agg](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#agg-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-)([TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1> col1,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U2> col2,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U3> col3)

Computes the given aggregations, returning a Dataset of tuples for each unique key and the result of computing these aggregations over all elements in the group.

<U1,U2,U3,U4> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<scala.Tuple5<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1,U2,U3,U4>>

[agg](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#agg-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-)([TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1> col1,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U2> col2,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U3> col3,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U4> col4)

Computes the given aggregations, returning a Dataset of tuples for each unique key and the result of computing these aggregations over all elements in the group.

<U1,U2,U3,U4,U5> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<scala.Tuple6<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1,U2,U3,U4,U5>>

[agg](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#agg-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-)([TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1> col1,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U2> col2,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U3> col3,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U4> col4,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U5> col5)

Computes the given aggregations, returning a Dataset of tuples for each unique key and the result of computing these aggregations over all elements in the group.

<U1,U2,U3,U4,U5,U6> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<scala.Tuple7<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1,U2,U3,U4,U5,U6>>

[agg](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#agg-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-)([TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1> col1,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U2> col2,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U3> col3,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U4> col4,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U5> col5,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U6> col6)

Computes the given aggregations, returning a Dataset of tuples for each unique key and the result of computing these aggregations over all elements in the group.

<U1,U2,U3,U4,U5,U6,U7> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<scala.Tuple8<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1,U2,U3,U4,U5,U6,U7>>

[agg](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#agg-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-)([TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1> col1,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U2> col2,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U3> col3,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U4> col4,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U5> col5,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U6> col6,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U7> col7)

Computes the given aggregations, returning a Dataset of tuples for each unique key and the result of computing these aggregations over all elements in the group.

<U1,U2,U3,U4,U5,U6,U7,U8> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<scala.Tuple9<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1,U2,U3,U4,U5,U6,U7,U8>>

[agg](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#agg-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-org.apache.spark.sql.TypedColumn-)([TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U1> col1,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U2> col2,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U3> col3,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U4> col4,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U5> col5,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U6> col6,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U7> col7,[TypedColumn](../../../../org/apache/spark/sql/TypedColumn.html "class in org.apache.spark.sql")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U8> col8)

Computes the given aggregations, returning a Dataset of tuples for each unique key and the result of computing these aggregations over all elements in the group.

<U,R> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<R>

[cogroup](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#cogroup-org.apache.spark.sql.KeyValueGroupedDataset-org.apache.spark.api.java.function.CoGroupFunction-org.apache.spark.sql.Encoder-)([KeyValueGroupedDataset](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "class in org.apache.spark.sql")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U> other,[CoGroupFunction](../../../../org/apache/spark/api/java/function/CoGroupFunction.html "interface in org.apache.spark.api.java.function")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U,R> f,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<R> encoder)

(Java-specific) Applies the given function to each cogrouped data.

<U,R> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<R>

[cogroup](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#cogroup-org.apache.spark.sql.KeyValueGroupedDataset-scala.Function3-org.apache.spark.sql.Encoder-)([KeyValueGroupedDataset](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "class in org.apache.spark.sql")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U> other, scala.Function3<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),scala.collection.Iterator<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>,scala.collection.Iterator<U>,scala.collection.TraversableOnce<R>> f,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<R> evidence$16)

(Scala-specific) Applies the given function to each cogrouped data.

<U,R> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<R>

[cogroupSorted](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#cogroupSorted-org.apache.spark.sql.KeyValueGroupedDataset-org.apache.spark.sql.Column:A-org.apache.spark.sql.Column:A-org.apache.spark.api.java.function.CoGroupFunction-org.apache.spark.sql.Encoder-)([KeyValueGroupedDataset](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "class in org.apache.spark.sql")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U> other,[Column](../../../../org/apache/spark/sql/Column.html "class in org.apache.spark.sql")[] thisSortExprs,[Column](../../../../org/apache/spark/sql/Column.html "class in org.apache.spark.sql")[] otherSortExprs,[CoGroupFunction](../../../../org/apache/spark/api/java/function/CoGroupFunction.html "interface in org.apache.spark.api.java.function")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U,R> f,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<R> encoder)

(Java-specific) Applies the given function to each sorted cogrouped data.

<U,R> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<R>

[cogroupSorted](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#cogroupSorted-org.apache.spark.sql.KeyValueGroupedDataset-scala.collection.Seq-scala.collection.Seq-scala.Function3-org.apache.spark.sql.Encoder-)([KeyValueGroupedDataset](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "class in org.apache.spark.sql")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U> other, scala.collection.Seq<[Column](../../../../org/apache/spark/sql/Column.html "class in org.apache.spark.sql")> thisSortExprs, scala.collection.Seq<[Column](../../../../org/apache/spark/sql/Column.html "class in org.apache.spark.sql")> otherSortExprs, scala.Function3<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),scala.collection.Iterator<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>,scala.collection.Iterator<U>,scala.collection.TraversableOnce<R>> f,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<R> evidence$17)

(Scala-specific) Applies the given function to each sorted cogrouped data.

[Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<scala.Tuple2<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),Object>>

[count](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#count--)()

Returns a Dataset that contains a tuple with each key and the number of items present for that key.

<U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[flatMapGroups](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#flatMapGroups-org.apache.spark.api.java.function.FlatMapGroupsFunction-org.apache.spark.sql.Encoder-)([FlatMapGroupsFunction](../../../../org/apache/spark/api/java/function/FlatMapGroupsFunction.html "interface in org.apache.spark.api.java.function")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U> f,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> encoder)

(Java-specific) Applies the given function to each group of data.

<U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[flatMapGroups](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#flatMapGroups-scala.Function2-org.apache.spark.sql.Encoder-)(scala.Function2<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),scala.collection.Iterator<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>,scala.collection.TraversableOnce<U>> f,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> evidence$3)

(Scala-specific) Applies the given function to each group of data.

<S,U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[flatMapGroupsWithState](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#flatMapGroupsWithState-org.apache.spark.api.java.function.FlatMapGroupsWithStateFunction-org.apache.spark.sql.streaming.OutputMode-org.apache.spark.sql.Encoder-org.apache.spark.sql.Encoder-org.apache.spark.sql.streaming.GroupStateTimeout-)([FlatMapGroupsWithStateFunction](../../../../org/apache/spark/api/java/function/FlatMapGroupsWithStateFunction.html "interface in org.apache.spark.api.java.function")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),S,U> func,[OutputMode](../../../../org/apache/spark/sql/streaming/OutputMode.html "class in org.apache.spark.sql.streaming") outputMode,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<S> stateEncoder,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> outputEncoder,[GroupStateTimeout](../../../../org/apache/spark/sql/streaming/GroupStateTimeout.html "class in org.apache.spark.sql.streaming") timeoutConf)

(Java-specific) Applies the given function to each group of data, while maintaining a user-defined per-group state.

<S,U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[flatMapGroupsWithState](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#flatMapGroupsWithState-org.apache.spark.api.java.function.FlatMapGroupsWithStateFunction-org.apache.spark.sql.streaming.OutputMode-org.apache.spark.sql.Encoder-org.apache.spark.sql.Encoder-org.apache.spark.sql.streaming.GroupStateTimeout-org.apache.spark.sql.KeyValueGroupedDataset-)([FlatMapGroupsWithStateFunction](../../../../org/apache/spark/api/java/function/FlatMapGroupsWithStateFunction.html "interface in org.apache.spark.api.java.function")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),S,U> func,[OutputMode](../../../../org/apache/spark/sql/streaming/OutputMode.html "class in org.apache.spark.sql.streaming") outputMode,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<S> stateEncoder,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> outputEncoder,[GroupStateTimeout](../../../../org/apache/spark/sql/streaming/GroupStateTimeout.html "class in org.apache.spark.sql.streaming") timeoutConf,[KeyValueGroupedDataset](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "class in org.apache.spark.sql")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),S> initialState)

(Java-specific) Applies the given function to each group of data, while maintaining a user-defined per-group state.

<S,U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[flatMapGroupsWithState](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#flatMapGroupsWithState-org.apache.spark.sql.streaming.OutputMode-org.apache.spark.sql.streaming.GroupStateTimeout-scala.Function3-org.apache.spark.sql.Encoder-org.apache.spark.sql.Encoder-)([OutputMode](../../../../org/apache/spark/sql/streaming/OutputMode.html "class in org.apache.spark.sql.streaming") outputMode,[GroupStateTimeout](../../../../org/apache/spark/sql/streaming/GroupStateTimeout.html "class in org.apache.spark.sql.streaming") timeoutConf, scala.Function3<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),scala.collection.Iterator<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>,[GroupState](../../../../org/apache/spark/sql/streaming/GroupState.html "interface in org.apache.spark.sql.streaming")<S>,scala.collection.Iterator<U>> func,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<S> evidence$12,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> evidence$13)

(Scala-specific) Applies the given function to each group of data, while maintaining a user-defined per-group state.

<S,U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[flatMapGroupsWithState](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#flatMapGroupsWithState-org.apache.spark.sql.streaming.OutputMode-org.apache.spark.sql.streaming.GroupStateTimeout-org.apache.spark.sql.KeyValueGroupedDataset-scala.Function3-org.apache.spark.sql.Encoder-org.apache.spark.sql.Encoder-)([OutputMode](../../../../org/apache/spark/sql/streaming/OutputMode.html "class in org.apache.spark.sql.streaming") outputMode,[GroupStateTimeout](../../../../org/apache/spark/sql/streaming/GroupStateTimeout.html "class in org.apache.spark.sql.streaming") timeoutConf,[KeyValueGroupedDataset](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "class in org.apache.spark.sql")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),S> initialState, scala.Function3<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),scala.collection.Iterator<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>,[GroupState](../../../../org/apache/spark/sql/streaming/GroupState.html "interface in org.apache.spark.sql.streaming")<S>,scala.collection.Iterator<U>> func,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<S> evidence$14,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> evidence$15)

(Scala-specific) Applies the given function to each group of data, while maintaining a user-defined per-group state.

<U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[flatMapSortedGroups](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#flatMapSortedGroups-org.apache.spark.sql.Column:A-org.apache.spark.api.java.function.FlatMapGroupsFunction-org.apache.spark.sql.Encoder-)([Column](../../../../org/apache/spark/sql/Column.html "class in org.apache.spark.sql")[] SortExprs,[FlatMapGroupsFunction](../../../../org/apache/spark/api/java/function/FlatMapGroupsFunction.html "interface in org.apache.spark.api.java.function")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U> f,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> encoder)

(Java-specific) Applies the given function to each group of data.

<U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[flatMapSortedGroups](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#flatMapSortedGroups-scala.collection.Seq-scala.Function2-org.apache.spark.sql.Encoder-)(scala.collection.Seq<[Column](../../../../org/apache/spark/sql/Column.html "class in org.apache.spark.sql")> sortExprs, scala.Function2<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),scala.collection.Iterator<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>,scala.collection.TraversableOnce<U>> f,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> evidence$4)

(Scala-specific) Applies the given function to each group of data.

<L> [KeyValueGroupedDataset](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "class in org.apache.spark.sql")<L,[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>

[keyAs](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#keyAs-org.apache.spark.sql.Encoder-)([Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<L> evidence$1)

Returns a new KeyValueGroupedDataset where the type of the key has been mapped to the specified type.

[Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>

[keys](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#keys--)()

Returns a Dataset that contains each unique key.

<U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[mapGroups](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#mapGroups-scala.Function2-org.apache.spark.sql.Encoder-)(scala.Function2<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),scala.collection.Iterator<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>,U> f,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> evidence$5)

(Scala-specific) Applies the given function to each group of data.

<U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[mapGroups](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#mapGroups-org.apache.spark.api.java.function.MapGroupsFunction-org.apache.spark.sql.Encoder-)([MapGroupsFunction](../../../../org/apache/spark/api/java/function/MapGroupsFunction.html "interface in org.apache.spark.api.java.function")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),U> f,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> encoder)

(Java-specific) Applies the given function to each group of data.

<S,U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[mapGroupsWithState](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#mapGroupsWithState-scala.Function3-org.apache.spark.sql.Encoder-org.apache.spark.sql.Encoder-)(scala.Function3<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),scala.collection.Iterator<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>,[GroupState](../../../../org/apache/spark/sql/streaming/GroupState.html "interface in org.apache.spark.sql.streaming")<S>,U> func,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<S> evidence$6,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> evidence$7)

(Scala-specific) Applies the given function to each group of data, while maintaining a user-defined per-group state.

<S,U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[mapGroupsWithState](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#mapGroupsWithState-org.apache.spark.sql.streaming.GroupStateTimeout-scala.Function3-org.apache.spark.sql.Encoder-org.apache.spark.sql.Encoder-)([GroupStateTimeout](../../../../org/apache/spark/sql/streaming/GroupStateTimeout.html "class in org.apache.spark.sql.streaming") timeoutConf, scala.Function3<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),scala.collection.Iterator<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>,[GroupState](../../../../org/apache/spark/sql/streaming/GroupState.html "interface in org.apache.spark.sql.streaming")<S>,U> func,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<S> evidence$8,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> evidence$9)

(Scala-specific) Applies the given function to each group of data, while maintaining a user-defined per-group state.

<S,U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[mapGroupsWithState](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#mapGroupsWithState-org.apache.spark.sql.streaming.GroupStateTimeout-org.apache.spark.sql.KeyValueGroupedDataset-scala.Function3-org.apache.spark.sql.Encoder-org.apache.spark.sql.Encoder-)([GroupStateTimeout](../../../../org/apache/spark/sql/streaming/GroupStateTimeout.html "class in org.apache.spark.sql.streaming") timeoutConf,[KeyValueGroupedDataset](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "class in org.apache.spark.sql")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),S> initialState, scala.Function3<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),scala.collection.Iterator<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>,[GroupState](../../../../org/apache/spark/sql/streaming/GroupState.html "interface in org.apache.spark.sql.streaming")<S>,U> func,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<S> evidence$10,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> evidence$11)

(Scala-specific) Applies the given function to each group of data, while maintaining a user-defined per-group state.

<S,U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[mapGroupsWithState](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#mapGroupsWithState-org.apache.spark.api.java.function.MapGroupsWithStateFunction-org.apache.spark.sql.Encoder-org.apache.spark.sql.Encoder-)([MapGroupsWithStateFunction](../../../../org/apache/spark/api/java/function/MapGroupsWithStateFunction.html "interface in org.apache.spark.api.java.function")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),S,U> func,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<S> stateEncoder,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> outputEncoder)

(Java-specific) Applies the given function to each group of data, while maintaining a user-defined per-group state.

<S,U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[mapGroupsWithState](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#mapGroupsWithState-org.apache.spark.api.java.function.MapGroupsWithStateFunction-org.apache.spark.sql.Encoder-org.apache.spark.sql.Encoder-org.apache.spark.sql.streaming.GroupStateTimeout-)([MapGroupsWithStateFunction](../../../../org/apache/spark/api/java/function/MapGroupsWithStateFunction.html "interface in org.apache.spark.api.java.function")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),S,U> func,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<S> stateEncoder,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> outputEncoder,[GroupStateTimeout](../../../../org/apache/spark/sql/streaming/GroupStateTimeout.html "class in org.apache.spark.sql.streaming") timeoutConf)

(Java-specific) Applies the given function to each group of data, while maintaining a user-defined per-group state.

<S,U> [Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<U>

[mapGroupsWithState](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#mapGroupsWithState-org.apache.spark.api.java.function.MapGroupsWithStateFunction-org.apache.spark.sql.Encoder-org.apache.spark.sql.Encoder-org.apache.spark.sql.streaming.GroupStateTimeout-org.apache.spark.sql.KeyValueGroupedDataset-)([MapGroupsWithStateFunction](../../../../org/apache/spark/api/java/function/MapGroupsWithStateFunction.html "interface in org.apache.spark.api.java.function")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),S,U> func,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<S> stateEncoder,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<U> outputEncoder,[GroupStateTimeout](../../../../org/apache/spark/sql/streaming/GroupStateTimeout.html "class in org.apache.spark.sql.streaming") timeoutConf,[KeyValueGroupedDataset](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "class in org.apache.spark.sql")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),S> initialState)

(Java-specific) Applies the given function to each group of data, while maintaining a user-defined per-group state.

<W> [KeyValueGroupedDataset](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "class in org.apache.spark.sql")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),W>

[mapValues](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#mapValues-scala.Function1-org.apache.spark.sql.Encoder-)(scala.Function1<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),W> func,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<W> evidence$2)

Returns a new KeyValueGroupedDataset where the given function func has been applied to the data.

<W> [KeyValueGroupedDataset](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "class in org.apache.spark.sql")<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),W>

[mapValues](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#mapValues-org.apache.spark.api.java.function.MapFunction-org.apache.spark.sql.Encoder-)([MapFunction](../../../../org/apache/spark/api/java/function/MapFunction.html "interface in org.apache.spark.api.java.function")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),W> func,[Encoder](../../../../org/apache/spark/sql/Encoder.html "interface in org.apache.spark.sql")<W> encoder)

Returns a new KeyValueGroupedDataset where the given function func has been applied to the data.

org.apache.spark.sql.execution.QueryExecution

[queryExecution](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#queryExecution--)()

[Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<scala.Tuple2<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>>

[reduceGroups](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#reduceGroups-scala.Function2-)(scala.Function2<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")> f)

(Scala-specific) Reduces the elements of each group of data using the specified binary function.

[Dataset](../../../../org/apache/spark/sql/Dataset.html "class in org.apache.spark.sql")<scala.Tuple2<[K](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset"),[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")>>

[reduceGroups](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#reduceGroups-org.apache.spark.api.java.function.ReduceFunction-)([ReduceFunction](../../../../org/apache/spark/api/java/function/ReduceFunction.html "interface in org.apache.spark.api.java.function")<[V](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html "type parameter in KeyValueGroupedDataset")> f)

(Java-specific) Reduces the elements of each group of data using the specified binary function.

String

[toString](../../../../org/apache/spark/sql/KeyValueGroupedDataset.html#toString--)()