Github user chenerlu commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/877#discussion_r115928229
--- Diff: integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/createtable/TestCreateTableSyntax.scala ---
@@ -31,7 +36,60 @@ class TestCreateTableSyntax extends QueryTest with BeforeAndAfterAll {
override def beforeAll {
}
+ test("test carbon table create with bitmap column") {
+
+ sql("drop table if exists carbontable")
+ sql("""
+ CREATE TABLE IF NOT EXISTS carbontable
+ (ID Int, date Date, country String,
+ name String, phonetype String, serialname char(10), salary Int)
+ STORED BY 'carbondata'
+ TBLPROPERTIES ('BITMAP'='name,country')
+ """)
+ val dataBaseName = "default"
+ val tableName = "carbontable"
+ val carbonRelation = CarbonEnv.get.carbonMetastore.lookupRelation1(Option(dataBaseName),
+ tableName)(sqlContext).asInstanceOf[CarbonRelation]
+ val carbonTable = carbonRelation.tableMeta.carbonTable
+ val dimensions = carbonTable.getDimensionByTableName(tableName.toLowerCase())
+ .toArray.map(_.asInstanceOf[CarbonDimension])
+ assert(dimensions(1).getColumnSchema.getColumnName.equals("country"))
+ assert(dimensions(2).getColumnSchema.getColumnName.equals("name"))
+ assert(dimensions(1).getColumnSchema.hasEncoding(Encoding.BITMAP))
+ assert(dimensions(2).getColumnSchema.hasEncoding(Encoding.BITMAP))
--- End diff --
after assertion, pls drop table for avoiding other test.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at
[hidden email] or file a JIRA ticket
with INFRA.
---