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 2020/06/08 02:12:50 UTC

[GitHub] [arrow] liyafan82 commented on a change in pull request #7354: ARROW-8909: [Java] Out of order writes using setSafe

liyafan82 commented on a change in pull request #7354:
URL: https://github.com/apache/arrow/pull/7354#discussion_r436429167



##########
File path: docs/source/java/vector.rst
##########
@@ -118,6 +118,28 @@ Some points to note about the steps above:
   no longer used, to avoid resource leak. To make sure of this, it is recommended to place vector related operations
   into a try-with-resources block.
 
+* For fixed width vectors (e.g. IntVector), we can set values at different indices in arbitrary orders.
+  For variable width vectors (e.g. VarCharVector), however, we must set values in non-decreasing order of the
+  indices. Otherwise, the values after the set positiion will become invalid. For example, suppose we use the
+  following statements to populate a variable width vector:
+
+.. code-block:: Java
+
+    VarCharVector vector = new VarCharVector("vector", allocator)) {

Review comment:
       Typo fixed. Thanks a lot for your careful review. 




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

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