You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/02/09 18:56:37 UTC

[GitHub] [arrow] rsaccoccio opened a new pull request #12382: ARROW-15629: [GLib] Add garrow_string_array_builder_append_string_n()

rsaccoccio opened a new pull request #12382:
URL: https://github.com/apache/arrow/pull/12382


   Adds a new function garrow_string_array_builder_append_string_n() that takes a string length.
   I'm not clear how to handle the versioning.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] kou commented on pull request #12382: ARROW-15629: [GLib] Add garrow_string_array_builder_append_string_n()

Posted by GitBox <gi...@apache.org>.
kou commented on pull request #12382:
URL: https://github.com/apache/arrow/pull/12382#issuecomment-1034225546


   FYI: You can use `garrow_binary_array_builder_append_value()` for this use case because `GArrowStringArrayBuilder` is a subclass of `GArrowBinaryArrayBuilder`:
   
   ```c
   ```


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #12382: ARROW-15629: [GLib] Add garrow_string_array_builder_append_string_n()

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12382:
URL: https://github.com/apache/arrow/pull/12382#issuecomment-1034091677






-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] kou commented on a change in pull request #12382: ARROW-15629: [GLib] Add garrow_string_array_builder_append_string_n()

Posted by GitBox <gi...@apache.org>.
kou commented on a change in pull request #12382:
URL: https://github.com/apache/arrow/pull/12382#discussion_r803119793



##########
File path: c_glib/arrow-glib/array-builder.h
##########
@@ -754,6 +754,14 @@ GARROW_AVAILABLE_IN_0_16
 gboolean garrow_string_array_builder_append_string(GArrowStringArrayBuilder *builder,
                                                    const gchar *value,
                                                    GError **error);
+
+GARROW_AVAILABLE_IN_7_0

Review comment:
       ```suggestion
   GARROW_AVAILABLE_IN_8_0
   ```

##########
File path: c_glib/arrow-glib/array-builder.cpp
##########
@@ -3328,13 +3328,36 @@ gboolean
 garrow_string_array_builder_append_string(GArrowStringArrayBuilder *builder,
                                           const gchar *value,
                                           GError **error)
+{
+  return garrow_string_array_builder_append_string_n(builder,
+                                                     value,
+                                                     static_cast<gint32>(strlen(value)),
+                                                     error);
+}
+
+/**
+ * garrow_string_array_builder_append_string_n:
+ * @builder: A #GArrowStringArrayBuilder.
+ * @value: A string value.
+ * @length: The length of the string value.
+ * @error: (nullable): Return location for a #GError or %NULL.
+ *
+ * Returns: %TRUE on success, %FALSE if there was an error.
+ *
+ * Since: 7.1.0

Review comment:
       ```suggestion
    * Since: 8.0.0
   ```




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] kou edited a comment on pull request #12382: ARROW-15629: [GLib] Add garrow_string_array_builder_append_string_n()

Posted by GitBox <gi...@apache.org>.
kou edited a comment on pull request #12382:
URL: https://github.com/apache/arrow/pull/12382#issuecomment-1034225546


   FYI: You can use `garrow_binary_array_builder_append_value()` for this use case because `GArrowStringArrayBuilder` is a subclass of `GArrowBinaryArrayBuilder`:
   
   ```c
   garrow_binary_array_builder_append_value(GARROW_BINARY_ARRAY_BUILDER(builder), value, value_length, &error);
   ```


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] kou commented on a change in pull request #12382: ARROW-15629: [GLib] Add garrow_string_array_builder_append_string_n()

Posted by GitBox <gi...@apache.org>.
kou commented on a change in pull request #12382:
URL: https://github.com/apache/arrow/pull/12382#discussion_r803116686



##########
File path: c_glib/arrow-glib/array-builder.cpp
##########
@@ -3328,13 +3328,36 @@ gboolean
 garrow_string_array_builder_append_string(GArrowStringArrayBuilder *builder,
                                           const gchar *value,
                                           GError **error)
+{
+  return garrow_string_array_builder_append_string_n(builder,
+                                                     value,
+                                                     static_cast<gint32>(strlen(value)),
+                                                     error);
+}
+
+/**
+ * garrow_string_array_builder_append_string_n:

Review comment:
       Could you use `_len` suffix instead of `_n` suffix because GLib uses `_len` suffix for this case such as `g_string_append_len()` https://docs.gtk.org/glib/method.String.append_len.html ?
   
   ```suggestion
    * garrow_string_array_builder_append_string_len:
   ```
   




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org