kou commented on code in PR #954:
URL: https://github.com/apache/arrow-adbc/pull/954#discussion_r1281258436


##########
c/driver/common/utils.c:
##########
@@ -18,38 +18,178 @@
 #include "utils.h"
 
 #include <errno.h>
-#include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include <assert.h>
+#include "adbc.h"
 
 static size_t kErrorBufferSize = 256;
 
+struct AdbcErrorDetails {
+  char* message;
+
+  char** keys;
+  uint8_t** values;
+  size_t* lengths;
+  int count;
+  int capacity;
+};
+
+static void ReleaseErrorWithDetails(struct AdbcError* error) {
+  struct AdbcErrorDetails* details = (struct 
AdbcErrorDetails*)error->private_data;
+  free(details->message);
+
+  for (int i = 0; i < 2 * details->count; i++) {

Review Comment:
   It seems that we can use `details->count` instead of `2 * details->count` 
here.



-- 
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