belugabehr commented on a change in pull request #548:
URL: https://github.com/apache/hive/pull/548#discussion_r437556723



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorAssignRow.java
##########
@@ -466,11 +466,11 @@ private void assignRowColumn(
             if (object instanceof String) {
               String string = (String) object;
               byte[] bytes = string.getBytes();

Review comment:
       StringBytes should include the CharSet of UTF8

##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorAssignRow.java
##########
@@ -778,7 +778,7 @@ private void assignConvertRowColumn(ColumnVector 
columnVector, int batchIndex,
               text = new Text();
             }
             text.set(string);
-            ((BytesColumnVector) columnVector).setVal(
+            ((BytesColumnVector) columnVector).setRef(

Review comment:
       Text here is used as a re-usable buffer (if no buffer is passed into the 
method, a new one is created.  I'm honestly not sure why the String is being 
Wrapped in a Text, at a quick glance, that seems like it can be removed, 
however, for the purposes of this PR, this is no immutable and therefore is not 
a candidate for `setRef`.

##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorAssignRow.java
##########
@@ -778,7 +778,7 @@ private void assignConvertRowColumn(ColumnVector 
columnVector, int batchIndex,
               text = new Text();
             }
             text.set(string);
-            ((BytesColumnVector) columnVector).setVal(
+            ((BytesColumnVector) columnVector).setRef(

Review comment:
       Text here is used as a re-usable buffer (if no buffer is passed into the 
method, a new one is created.  I'm honestly not sure why the String is being 
Wrapped in a Text, at a quick glance, that seems like it can be removed, 
however, for the purposes of this PR, this is not immutable and therefore is 
not a candidate for `setRef`.




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to