Skip to content

Commit

Permalink
[SPARK-8301] changed call of UTF8String.set to UTF8String.from
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekbecker committed Jun 15, 2015
1 parent a5f853a commit e4530d2
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ public double getDouble(int i) {

public UTF8String getUTF8String(int i) {
assertIndexIsValid(i);
final UTF8String str = new UTF8String();
final long offsetToStringSize = getLong(i);
final int stringSizeInBytes =
(int) PlatformDependent.UNSAFE.getLong(baseObject, baseOffset + offsetToStringSize);
Expand All @@ -322,8 +321,7 @@ public UTF8String getUTF8String(int i) {
PlatformDependent.BYTE_ARRAY_OFFSET,
stringSizeInBytes
);
str.set(strBytes);
return str;
return UTF8String.fromBytes(strBytes);
}

@Override
Expand Down

0 comments on commit e4530d2

Please sign in to comment.