Github user olarayej commented on the pull request:
https://github.com/apache/spark/pull/11336#issuecomment-191399711
Also, the fact that the size of a column depends on the join seems
counter-intuitive for an R user:
```
> dim(irisDF2)
[1] 150 5
> dim(irisDF)
[1] 150 5
> x <- irisDF$Sepal_Length + irisDF2$Sepal_Length
```
In R, x will always have 150 elements. However:
```
# Cartesian product
> df3 <- join(irisDF, irisDF2)
> dim(select(df3, x))
[1] 22500 1
# Inner join by Species
> df4 <- merge(irisDF, irisDF2, by="Species")
> dim(select(df4, x))
[1] 7500 1
```
I still think SparkR shouldn't allow operations between columns coming from
different DataFrames. And, in the case of a join, operations can be performed
on the joined DataFrame (e.g., df3) as opposed to the original ones (e.g.,
irisDF and irisDF2).
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]