Skip to content

Commit

Permalink
fix: code review
Browse files Browse the repository at this point in the history
  • Loading branch information
davisusanibar committed Aug 29, 2023
1 parent 2ec0836 commit c4d82b6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions java/source/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Concatenate Value Vectors
=========================

In some cases, we need to concatenate two value vectors into one. To accomplish
this, we can use `VectorAppender`_. The following code create two vectors separately,
and then appends the two vectors together.
this, we can use `VectorAppender`_. Consider also that the initial Value Vector
is mutated and used to concatenate the added values.

.. testcode::

Expand Down Expand Up @@ -56,13 +56,16 @@ and then appends the two vectors together.
VectorAppender appenderUtil = new VectorAppender(initialValues);
ValueVector resultOfVectorsAppended = toAppend.accept(appenderUtil, null);
System.out.println("IntVector Result: " + resultOfVectorsAppended);
System.out.println("Initial IntVector mutated: " +
(initialValues.hashCode()==resultOfVectorsAppended.hashCode())) ;
}

.. testoutput::

Initial IntVector: [1, 2]
IntVector to Append: [null, 4, null, 6]
IntVector Result: [1, 2, null, 4, null, 6]
Initial IntVector mutated: true

Compare Vectors for Field Equality
==================================
Expand Down

0 comments on commit c4d82b6

Please sign in to comment.