What is the difference between as.data.frame()
and collect()
, when heaving a DataFrame object into local memory?
Asked
Active
Viewed 732 times
5

PeterPancake
- 95
- 8
-
`str` returns the same for both in my output and `identical` returns `TRUE` – PeterPancake Jul 07 '16 at 16:24
1 Answers
4
There is no difference whatsoever. Excluding argument validation Sparkr::as.data.frame
is simply implemented with a single call to SparkR::collect
:
setMethod("as.data.frame",
signature(x = "DataFrame"),
function(x, ...) {
# Arguments validation
}
collect(x)
})

zero323
- 322,348
- 103
- 959
- 935