lidavidm commented on code in PR #143:
URL: https://github.com/apache/arrow-nanoarrow/pull/143#discussion_r1129492452


##########
extensions/nanoarrow_ipc/src/nanoarrow/nanoarrow_ipc.c:
##########
@@ -785,5 +876,261 @@ ArrowErrorCode ArrowIpcReaderDecode(struct 
ArrowIpcReader* reader,
       return EINVAL;
   }
 
+  private_data->last_message = message_header;
+  return NANOARROW_OK;
+}
+
+ArrowErrorCode ArrowIpcReaderGetSchema(struct ArrowIpcReader* reader,
+                                       struct ArrowSchema* out,
+                                       struct ArrowError* error) {
+  struct ArrowIpcReaderPrivate* private_data =
+      (struct ArrowIpcReaderPrivate*)reader->private_data;
+
+  if (private_data->schema.release == NULL) {
+    ArrowErrorSet(error, "reader does not contain a valid schema");
+    return EINVAL;
+  }
+
+  ArrowSchemaMove(&private_data->schema, out);

Review Comment:
   It does break expectations for Get though; usually you'd expect that to be 
idempotent



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to