carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject carbondata git commit: [CARBONDATA-2660][BloomDataMap] Add test for querying on longstring bloom index column
Date Sat, 07 Jul 2018 11:05:05 GMT
Repository: carbondata
Updated Branches:
  refs/heads/master 21b56dfd8 -> 7924d5e37


[CARBONDATA-2660][BloomDataMap] Add test for querying on longstring bloom index column

Filtering on longstring bloom index column is already supported in PR #2403, here we only
add test for it.

This closes #2416


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

Branch: refs/heads/master
Commit: 7924d5e379d056dc8eede6e926dc2d39a16fefcf
Parents: 21b56df
Author: xuchuanyin <xuchuanyin@hust.edu.cn>
Authored: Sat Jul 7 16:29:26 2018 +0800
Committer: Jacky Li <jacky.likun@qq.com>
Committed: Sat Jul 7 19:04:54 2018 +0800

----------------------------------------------------------------------
 .../BloomCoarseGrainDataMapFunctionSuite.scala  | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/7924d5e3/integration/spark2/src/test/scala/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMapFunctionSuite.scala
----------------------------------------------------------------------
diff --git a/integration/spark2/src/test/scala/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMapFunctionSuite.scala
b/integration/spark2/src/test/scala/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMapFunctionSuite.scala
index d76fa5b..9e19ac2 100644
--- a/integration/spark2/src/test/scala/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMapFunctionSuite.scala
+++ b/integration/spark2/src/test/scala/org/apache/carbondata/datamap/bloom/BloomCoarseGrainDataMapFunctionSuite.scala
@@ -434,6 +434,26 @@ class BloomCoarseGrainDataMapFunctionSuite  extends QueryTest with BeforeAndAfte
       sql(s"SELECT * FROM $normalTable WHERE isNull(c2)"))
   }
 
+  test("test bloom datamap: querying with longstring index column") {
+    sql(s"CREATE TABLE $normalTable(c1 string, c2 int, c3 string) STORED BY 'carbondata'
TBLPROPERTIES('long_string_columns'='c3')")
+    sql(s"CREATE TABLE $bloomDMSampleTable(c1 string, c2 int, c3 string) STORED BY 'carbondata'
TBLPROPERTIES('long_string_columns'='c3')")
+    // create datamap on longstring columns
+    sql(
+      s"""
+         | CREATE DATAMAP $dataMapName on table $bloomDMSampleTable
+         | using 'bloomfilter'
+         | DMPROPERTIES('index_columns'='c3')
+       """.stripMargin)
+
+    sql(s"INSERT INTO $normalTable SELECT 'c1v1', 1, 'xxx'")
+    sql(s"INSERT INTO $bloomDMSampleTable SELECT 'c1v1', 1, 'xxx'")
+    sql(s"INSERT INTO $normalTable SELECT 'c1v1', 1, 'yyy'")
+    sql(s"INSERT INTO $bloomDMSampleTable SELECT 'c1v1', 1, 'yyy'")
+
+    checkAnswer(sql(s"SELECT * FROM $bloomDMSampleTable WHERE c3 = 'xxx'"),
+      sql(s"SELECT * FROM $normalTable WHERE c3 = 'xxx'"))
+  }
+
   override def afterAll(): Unit = {
     deleteFile(bigFile)
     sql(s"DROP TABLE IF EXISTS $normalTable")


Mime
View raw message