-
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 #238 from sun-rui/SPARKR-154_4
[SPARKR-154] Phase 3: implement intersection().
- Loading branch information
Showing
5 changed files
with
97 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ exportMethods( | |
"fullOuterJoin", | ||
"glom", | ||
"groupByKey", | ||
"intersection", | ||
"join", | ||
"keyBy", | ||
"keys", | ||
|
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,38 @@ | ||
% Generated by roxygen2 (4.0.2): do not edit by hand | ||
\docType{methods} | ||
\name{intersection,RDD,RDD-method} | ||
\alias{intersection} | ||
\alias{intersection,RDD} | ||
\alias{intersection,RDD,RDD-method} | ||
\title{Intersection of this RDD and another one.} | ||
\usage{ | ||
\S4method{intersection}{RDD,RDD}(x, other, | ||
numPartitions = SparkR::numPartitions(x)) | ||
|
||
intersection(x, other, numPartitions = 1L) | ||
} | ||
\arguments{ | ||
\item{x}{An RDD.} | ||
|
||
\item{other}{An RDD.} | ||
} | ||
\value{ | ||
An RDD which is the intersection of these two RDDs. | ||
} | ||
\description{ | ||
Return the intersection of this RDD and another one. | ||
The output will not contain any duplicate elements, | ||
even if the input RDDs did. Performs a hash partition | ||
across the cluster. | ||
Note that this method performs a shuffle internally. | ||
} | ||
\examples{ | ||
\dontrun{ | ||
sc <- sparkR.init() | ||
rdd1 <- parallelize(sc, list(1, 10, 2, 3, 4, 5)) | ||
rdd2 <- parallelize(sc, list(1, 6, 2, 3, 7, 8)) | ||
collect(sortBy(intersection(rdd1, rdd2), function(x) { x })) | ||
# list(1, 2, 3) | ||
} | ||
} | ||
|