diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorAssignRow.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorAssignRow.java index 19a3eedcb5..21ba610488 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorAssignRow.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorAssignRow.java @@ -24,6 +24,7 @@ import org.apache.hadoop.hive.common.type.Date; import org.apache.hadoop.hive.serde2.io.DateWritableV2; +import org.apache.hadoop.hive.serde2.lazy.LazyString; import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.MapObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.StandardUnionObjectInspector.StandardUnion; @@ -468,10 +469,15 @@ private void assignRowColumn( byte[] bytes = string.getBytes(); ((BytesColumnVector) columnVector).setVal( batchIndex, bytes, 0, bytes.length); + } else if(object instanceof LazyString) { + LazyString lazyString = new LazyString((LazyString) object); + Text tw = lazyString.getWritableObject(); + ((BytesColumnVector) columnVector).setVal( + batchIndex, tw.getBytes(), 0, tw.getLength()); } else { Text tw = (Text) object; ((BytesColumnVector) columnVector).setVal( - batchIndex, tw.getBytes(), 0, tw.getLength()); + batchIndex, tw.getBytes(), 0, tw.getLength()); } } break;