From 8baf554d85ed05a6cdc3c2c9442170792c2d05c8 Mon Sep 17 00:00:00 2001 From: Hyukjin Kwon Date: Fri, 26 Dec 2025 10:42:35 +0900 Subject: [PATCH 1/2] [R] Document Message and MessageReader classes --- r/R/message.R | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/r/R/message.R b/r/R/message.R index 897156738ae..80c239f2e7d 100644 --- a/r/R/message.R +++ b/r/R/message.R @@ -19,13 +19,25 @@ #' @title Message class #' +#' @description +#' `Message` holds an Arrow IPC message, which includes metadata and +#' an optional message body. +#' #' @usage NULL #' @format NULL #' @docType class #' -#' @section Methods: +#' @section R6 Methods: +#' +#' - `$Equals(other)`: Check if this `Message` is equal to another `Message` +#' - `$body_length()`: Return the length of the message body in bytes +#' - `$Verify()`: Check if the `Message` metadata is valid Flatbuffer format #' -#' TODO +#' @section Active bindings: +#' +#' - `$type`: The message type +#' - `$metadata`: The message metadata +#' - `$body`: The message body as a [Buffer] #' #' @rdname Message #' @name Message @@ -48,13 +60,23 @@ Message <- R6Class( #' @title MessageReader class #' +#' @description +#' `MessageReader` reads `Message` objects from an input stream. +#' #' @usage NULL #' @format NULL #' @docType class #' -#' @section Methods: +#' @section R6 Methods: +#' +#' - `$ReadNextMessage()`: Read the next `Message` from the stream. Returns `NULL` if +#' there are no more messages. +#' +#' @section Factory: +#' +#' `MessageReader$create()` takes the following argument: #' -#' TODO +#' * `stream`: An [InputStream] or object coercible to one (e.g., a raw vector) #' #' @rdname MessageReader #' @name MessageReader From 9fe61522dc187ecf43c2fa8bdc6fe8e791a98f06 Mon Sep 17 00:00:00 2001 From: Hyukjin Kwon Date: Fri, 26 Dec 2025 12:18:57 +0900 Subject: [PATCH 2/2] Update message.R --- r/R/message.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r/R/message.R b/r/R/message.R index 80c239f2e7d..364e8b414ef 100644 --- a/r/R/message.R +++ b/r/R/message.R @@ -76,7 +76,7 @@ Message <- R6Class( #' #' `MessageReader$create()` takes the following argument: #' -#' * `stream`: An [InputStream] or object coercible to one (e.g., a raw vector) +#' - `stream`: An [InputStream] or object coercible to one (e.g., a raw vector) #' #' @rdname MessageReader #' @name MessageReader