Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EFFA8200B28 for ; Sun, 12 Jun 2016 00:28:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EEC00160A54; Sat, 11 Jun 2016 22:28:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 41E61160A34 for ; Sun, 12 Jun 2016 00:28:43 +0200 (CEST) Received: (qmail 49423 invoked by uid 500); 11 Jun 2016 22:28:42 -0000 Mailing-List: contact commits-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@spark.apache.org Received: (qmail 49414 invoked by uid 99); 11 Jun 2016 22:28:42 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Jun 2016 22:28:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2F596DFDEF; Sat, 11 Jun 2016 22:28:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rxin@apache.org To: commits@spark.apache.org Message-Id: <34db49f446f94176a35062531a33c2db@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: spark git commit: [SPARK-15856][SQL] Revert API breaking changes made in SQLContext.range Date: Sat, 11 Jun 2016 22:28:42 +0000 (UTC) archived-at: Sat, 11 Jun 2016 22:28:44 -0000 Repository: spark Updated Branches: refs/heads/master 5bb4564cd -> 75705e8db [SPARK-15856][SQL] Revert API breaking changes made in SQLContext.range ## What changes were proposed in this pull request? It's easy for users to call `range(...).as[Long]` to get typed Dataset, and don't worth an API breaking change. This PR reverts it. ## How was this patch tested? N/A Author: Wenchen Fan Closes #13605 from cloud-fan/range. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/75705e8d Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/75705e8d Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/75705e8d Branch: refs/heads/master Commit: 75705e8dbb51ac91ffc7012fa67f072494c13832 Parents: 5bb4564 Author: Wenchen Fan Authored: Sat Jun 11 15:28:40 2016 -0700 Committer: Reynold Xin Committed: Sat Jun 11 15:28:40 2016 -0700 ---------------------------------------------------------------------- .../scala/org/apache/spark/sql/SQLContext.scala | 36 ++++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/75705e8d/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---------------------------------------------------------------------- diff --git a/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala b/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala index 23f2b6e..6fcc9bb 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala @@ -609,51 +609,51 @@ class SQLContext private[sql](val sparkSession: SparkSession) /** * :: Experimental :: - * Creates a [[Dataset]] with a single [[LongType]] column named `id`, containing elements + * Creates a [[DataFrame]] with a single [[LongType]] column named `id`, containing elements * in a range from 0 to `end` (exclusive) with step value 1. * - * @since 2.0.0 - * @group dataset + * @since 1.4.1 + * @group dataframe */ @Experimental - def range(end: Long): Dataset[java.lang.Long] = sparkSession.range(end) + def range(end: Long): DataFrame = sparkSession.range(end).toDF() /** * :: Experimental :: - * Creates a [[Dataset]] with a single [[LongType]] column named `id`, containing elements + * Creates a [[DataFrame]] with a single [[LongType]] column named `id`, containing elements * in a range from `start` to `end` (exclusive) with step value 1. * - * @since 2.0.0 - * @group dataset + * @since 1.4.0 + * @group dataframe */ @Experimental - def range(start: Long, end: Long): Dataset[java.lang.Long] = sparkSession.range(start, end) + def range(start: Long, end: Long): DataFrame = sparkSession.range(start, end).toDF() /** * :: Experimental :: - * Creates a [[Dataset]] with a single [[LongType]] column named `id`, containing elements + * Creates a [[DataFrame]] with a single [[LongType]] column named `id`, containing elements * in a range from `start` to `end` (exclusive) with a step value. * * @since 2.0.0 - * @group dataset + * @group dataframe */ @Experimental - def range(start: Long, end: Long, step: Long): Dataset[java.lang.Long] = { - sparkSession.range(start, end, step) + def range(start: Long, end: Long, step: Long): DataFrame = { + sparkSession.range(start, end, step).toDF() } /** * :: Experimental :: - * Creates a [[Dataset]] with a single [[LongType]] column named `id`, containing elements - * in a range from `start` to `end` (exclusive) with a step value, with partition number + * Creates a [[DataFrame]] with a single [[LongType]] column named `id`, containing elements + * in an range from `start` to `end` (exclusive) with an step value, with partition number * specified. * - * @since 2.0.0 - * @group dataset + * @since 1.4.0 + * @group dataframe */ @Experimental - def range(start: Long, end: Long, step: Long, numPartitions: Int): Dataset[java.lang.Long] = { - sparkSession.range(start, end, step, numPartitions) + def range(start: Long, end: Long, step: Long, numPartitions: Int): DataFrame = { + sparkSession.range(start, end, step, numPartitions).toDF() } /** --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org For additional commands, e-mail: commits-help@spark.apache.org