5

What is the difference between as.data.frame() and collect(), when heaving a DataFrame object into local memory?

1 Answers1

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