diff options
author | Reynold Xin <rxin@databricks.com> | 2016-03-24 22:56:34 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-03-24 22:56:34 -0700 |
commit | 1c70b7650f21fc51a07db1e4f28cebbc1fb47e94 (patch) | |
tree | 0e300fa255551887ffa01230e7d2a25f18796370 /sql/core/src/test/java | |
parent | 3619fec1ec395a66ad5ae1f614ce67fe173cf159 (diff) | |
download | spark-1c70b7650f21fc51a07db1e4f28cebbc1fb47e94.tar.gz spark-1c70b7650f21fc51a07db1e4f28cebbc1fb47e94.tar.bz2 spark-1c70b7650f21fc51a07db1e4f28cebbc1fb47e94.zip |
[SPARK-14145][SQL] Remove the untyped version of Dataset.groupByKey
## What changes were proposed in this pull request?
Dataset has two variants of groupByKey, one for untyped and the other for typed. It actually doesn't make as much sense to have an untyped API here, since apps that want to use untyped APIs should just use the groupBy "DataFrame" API.
## How was this patch tested?
This patch removes a method, and removes the associated tests.
Author: Reynold Xin <rxin@databricks.com>
Closes #11949 from rxin/SPARK-14145.
Diffstat (limited to 'sql/core/src/test/java')
-rw-r--r-- | sql/core/src/test/java/test/org/apache/spark/sql/JavaDatasetSuite.java | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/sql/core/src/test/java/test/org/apache/spark/sql/JavaDatasetSuite.java b/sql/core/src/test/java/test/org/apache/spark/sql/JavaDatasetSuite.java index 18f17a85a9..86db8df4c0 100644 --- a/sql/core/src/test/java/test/org/apache/spark/sql/JavaDatasetSuite.java +++ b/sql/core/src/test/java/test/org/apache/spark/sql/JavaDatasetSuite.java @@ -246,29 +246,6 @@ public class JavaDatasetSuite implements Serializable { } @Test - public void testGroupByColumn() { - List<String> data = Arrays.asList("a", "foo", "bar"); - Dataset<String> ds = context.createDataset(data, Encoders.STRING()); - KeyValueGroupedDataset<Integer, String> grouped = - ds.groupByKey(length(col("value"))).keyAs(Encoders.INT()); - - Dataset<String> mapped = grouped.mapGroups( - new MapGroupsFunction<Integer, String, String>() { - @Override - public String call(Integer key, Iterator<String> data) throws Exception { - StringBuilder sb = new StringBuilder(key.toString()); - while (data.hasNext()) { - sb.append(data.next()); - } - return sb.toString(); - } - }, - Encoders.STRING()); - - Assert.assertEquals(asSet("1a", "3foobar"), toSet(mapped.collectAsList())); - } - - @Test public void testSelect() { List<Integer> data = Arrays.asList(2, 6); Dataset<Integer> ds = context.createDataset(data, Encoders.INT()); |