You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by animeshbaranawal <gi...@git.apache.org> on 2015/06/01 12:35:38 UTC

[GitHub] spark pull request: [SPARK-7980] [SQL] Support SQLContext.range(en...

GitHub user animeshbaranawal opened a pull request:

    https://github.com/apache/spark/pull/6552

    [SPARK-7980] [SQL] Support SQLContext.range(end)

    Created an API range(end:Long) which generates dataframe containing entries from 0 to end-1.
    Added three tests accordingly in DataFrameSuite.scala.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/animeshbaranawal/spark SPARK-7980

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/6552.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #6552
    
----
commit d8396c0e3d5bdf6983ad20af202c0ab0767d48dd
Author: animesh <an...@apache.spark>
Date:   2015-06-01T10:28:44Z

    SPARK-7980: created function range(end:Long)

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7980] [SQL] Support SQLContext.range(en...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6552#discussion_r31418069
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---
    @@ -701,6 +701,21 @@ class SQLContext(@transient val sparkContext: SparkContext)
       /**
        * :: Experimental ::
        * Creates a [[DataFrame]] with a single [[LongType]] column named `id`, containing elements
    +   * in an range from 0 to `end`(exclusive) with step value 1.
    +   *
    +   * @since 1.4.0
    +   * @group dataframe
    +   */
    +  @Experimental
    +  def range(end: Long): DataFrame = {
    +    createDataFrame(
    +      sparkContext.range(0, end).map(Row(_)),
    +      StructType(StructField("id", LongType, nullable = false) :: Nil))
    --- End diff --
    
    Why not just call `range(0, end)`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7980] [SQL] Support SQLContext.range(en...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/6552#issuecomment-107392675
  
    Can one of the admins verify this patch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7980] [SQL] Support SQLContext.range(en...

Posted by animeshbaranawal <gi...@git.apache.org>.
Github user animeshbaranawal commented on the pull request:

    https://github.com/apache/spark/pull/6552#issuecomment-107411465
  
    Thanks for that suggestion... I will close this request then!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-7980] [SQL] Support SQLContext.range(en...

Posted by animeshbaranawal <gi...@git.apache.org>.
Github user animeshbaranawal closed the pull request at:

    https://github.com/apache/spark/pull/6552


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org