spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-7150) SQLContext.range()
Date Tue, 12 May 2015 10:26:00 GMT

     [ https://issues.apache.org/jira/browse/SPARK-7150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Apache Spark reassigned SPARK-7150:
-----------------------------------

    Assignee: Adrian Wang  (was: Apache Spark)

> SQLContext.range()
> ------------------
>
>                 Key: SPARK-7150
>                 URL: https://issues.apache.org/jira/browse/SPARK-7150
>             Project: Spark
>          Issue Type: Sub-task
>          Components: ML, SQL
>            Reporter: Joseph K. Bradley
>            Assignee: Adrian Wang
>            Priority: Minor
>              Labels: starter
>
> It would be handy to have easy ways to construct random columns for DataFrames.  Proposed
API:
> {code}
> class SQLContext {
>   // Return a DataFrame with a single column named "id" that has consecutive value from
0 to n.
>   def range(n: Long): DataFrame
>   def range(n: Long, numPartitions: Int): DataFrame
> }
> {code}
> Usage:
> {code}
> // uniform distribution
> ctx.range(1000).select(rand())
> // normal distribution
> ctx.range(1000).select(randn())
> {code}
> We should add an RangeIterator that supports long start/stop position, and then use it
to create an RDD as the basis for this DataFrame.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message