carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From qiang...@apache.org
Subject carbondata git commit: [CARBONDATA-2095]Copy data of GenericInternalRow for each iteration when converting stream segment to batch segment
Date Tue, 30 Jan 2018 10:40:36 GMT
Repository: carbondata
Updated Branches:
  refs/heads/master 9ec64a6d2 -> 2081fba7f


[CARBONDATA-2095]Copy data of GenericInternalRow for each iteration when converting stream
segment to batch segment

This closes #1881


Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/2081fba7
Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/2081fba7
Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/2081fba7

Branch: refs/heads/master
Commit: 2081fba7f845c57fe4332bc8f33680a91c842720
Parents: 9ec64a6
Author: Zhang Zhichao <441586683@qq.com>
Authored: Tue Jan 30 16:52:46 2018 +0800
Committer: QiangCai <qiangcai@qq.com>
Committed: Tue Jan 30 18:39:40 2018 +0800

----------------------------------------------------------------------
 .../org/apache/carbondata/streaming/StreamHandoffRDD.scala      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/2081fba7/streaming/src/main/scala/org/apache/carbondata/streaming/StreamHandoffRDD.scala
----------------------------------------------------------------------
diff --git a/streaming/src/main/scala/org/apache/carbondata/streaming/StreamHandoffRDD.scala
b/streaming/src/main/scala/org/apache/carbondata/streaming/StreamHandoffRDD.scala
index d092580..a96ab32 100644
--- a/streaming/src/main/scala/org/apache/carbondata/streaming/StreamHandoffRDD.scala
+++ b/streaming/src/main/scala/org/apache/carbondata/streaming/StreamHandoffRDD.scala
@@ -75,11 +75,14 @@ class StreamingRawResultIterator(
   }
 
   override def next(): Array[Object] = {
-    recordReader
+    val rowTmp = recordReader
       .getCurrentValue
       .asInstanceOf[GenericInternalRow]
       .values
       .asInstanceOf[Array[Object]]
+    val row = new Array[Object](rowTmp.length)
+    System.arraycopy(rowTmp, 0, row, 0, rowTmp.length)
+    row
   }
 }
 


Mime
View raw message