From c4d82b69bce510bc405b48bd11f2e9a6b274f2b2 Mon Sep 17 00:00:00 2001 From: david dali susanibar arce Date: Tue, 29 Aug 2023 10:21:41 -0500 Subject: [PATCH] fix: code review --- java/source/data.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/java/source/data.rst b/java/source/data.rst index b532eab7..9da5fe49 100644 --- a/java/source/data.rst +++ b/java/source/data.rst @@ -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:: @@ -56,6 +56,8 @@ 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:: @@ -63,6 +65,7 @@ and then appends the two vectors together. 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 ==================================