Github user sun-rui commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12836#discussion_r64870145
  
    --- 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 --
    
    key is not used later?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to