Github user NarineK commented on a diff in the pull request:
https://github.com/apache/spark/pull/12836#discussion_r64983139
--- Diff: R/pkg/R/deserialize.R ---
@@ -197,6 +197,31 @@ readMultipleObjects <- function(inputCon) {
data # this is a list of named lists now
}
+readMultipleObjectsWithKeys <- function(inputCon) {
+ # readMultipleObjectsWithKeys will read multiple continuous objects from
+ # a DataOutputStream. There is no preceding field telling the count
+ # of the objects, so the number of objects varies, we try to read
+ # all objects in a loop until the end of the stream. The rows in
+ # the stream are separated by grouping-key boundary
+ data <- list()
+ subData <- list()
+ while (TRUE) {
+ # If reaching the end of the stream, type returned should be "".
+ type <- readType(inputCon)
+ if (type == "") {
+ break
+ } else if (type == "r") {
+ # key boundary detected
+ readTypedObject(inputCon, type)
--- End diff --
it is actually a boundary separator not the key we used to refer in :
https://github.com/NarineK/spark/blob/9cacd4dbfa0e20d2a855e23f2962a258abbba553/R/pkg/inst/worker/worker.R#L94
No, it is not being used internally, it is a separator(to mark the group
boundaries)
---
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]