-
Notifications
You must be signed in to change notification settings - Fork 28.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #237 from sun-rui/SPARKR-154_3
[SPARKR-154] Phase 2: implement cartesian().
- Loading branch information
Davies Liu
committed
Apr 14, 2015
1 parent
1bdcb63
commit ae78312
Showing
6 changed files
with
197 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
% Generated by roxygen2 (4.0.2): do not edit by hand | ||
\docType{methods} | ||
\name{cartesian,RDD,RDD-method} | ||
\alias{cartesian} | ||
\alias{cartesian,RDD,RDD-method} | ||
\title{Cartesian product of this RDD and another one.} | ||
\usage{ | ||
\S4method{cartesian}{RDD,RDD}(x, other) | ||
|
||
cartesian(x, other) | ||
} | ||
\arguments{ | ||
\item{x}{An RDD.} | ||
|
||
\item{other}{An RDD.} | ||
} | ||
\value{ | ||
A new RDD which is the Cartesian product of these two RDDs. | ||
} | ||
\description{ | ||
Return the Cartesian product of this RDD and another one, | ||
that is, the RDD of all pairs of elements (a, b) where a | ||
is in this and b is in other. | ||
} | ||
\examples{ | ||
\dontrun{ | ||
sc <- sparkR.init() | ||
rdd <- parallelize(sc, 1:2) | ||
sortByKey(cartesian(rdd, rdd)) | ||
# list(list(1, 1), list(1, 2), list(2, 1), list(2, 2)) | ||
} | ||
} | ||
|