carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [06/50] [abbrv] carbondata git commit: [CARBONDATA-2100] Add query test case to check result of streaming handoff operation
Date Mon, 05 Feb 2018 15:02:24 GMT
[CARBONDATA-2100] Add query test case to check result of streaming handoff operation

Add query test case to check result of streaming handoff operation

This closes #1887


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

Branch: refs/heads/fgdatamap
Commit: c630b7e0c9b3b0eb53550b5500e7d58904a9376b
Parents: 9b47961
Author: QiangCai <qiangcai@qq.com>
Authored: Tue Jan 30 18:43:51 2018 +0800
Committer: Jacky Li <jacky.likun@qq.com>
Committed: Wed Jan 31 09:40:32 2018 +0800

----------------------------------------------------------------------
 .../org/apache/spark/carbondata/TestStreamingTableOperation.scala | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/c630b7e0/integration/spark2/src/test/scala/org/apache/spark/carbondata/TestStreamingTableOperation.scala
----------------------------------------------------------------------
diff --git a/integration/spark2/src/test/scala/org/apache/spark/carbondata/TestStreamingTableOperation.scala
b/integration/spark2/src/test/scala/org/apache/spark/carbondata/TestStreamingTableOperation.scala
index 3de1391..18e52f6 100644
--- a/integration/spark2/src/test/scala/org/apache/spark/carbondata/TestStreamingTableOperation.scala
+++ b/integration/spark2/src/test/scala/org/apache/spark/carbondata/TestStreamingTableOperation.scala
@@ -527,8 +527,11 @@ class TestStreamingTableOperation extends QueryTest with BeforeAndAfterAll
{
       Seq(Row(2 * 100))
     )
 
+    val resultBeforeHandoff = sql("select * from streaming.stream_table_handoff order by
id, name").collect()
     sql("alter table streaming.stream_table_handoff compact 'streaming'")
     Thread.sleep(5000)
+    val resultAfterHandoff = sql("select * from streaming.stream_table_handoff order by id,
name").collect()
+    assertResult(resultBeforeHandoff)(resultAfterHandoff)
     val newSegments = sql("show segments for table streaming.stream_table_handoff").collect()
     assert(newSegments.length == 3 || newSegments.length == 5)
     assertResult("Streaming")(newSegments((newSegments.length - 1) / 2).getString(1))


Mime
View raw message