Github user akashrn5 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2886#discussion_r230684559
--- Diff:
integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/dataload/TestNoInvertedIndexLoadAndQuery.scala
---
@@ -289,6 +292,44 @@ class TestNoInvertedIndexLoadAndQuery extends
QueryTest with BeforeAndAfterAll {
checkAnswer(sql("""select c2 from testNull where c2 is null"""),
Seq(Row(null), Row(null), Row(null), Row(null), Row(null), Row(null)))
}
+ test("inverted index with Dictionary_EXCLUDE and INVERTED_INDEX") {
+ sql("drop table if exists index1")
+ sql(
+ """
+ CREATE TABLE IF NOT EXISTS index1
+ (id Int, name String, city String)
+ STORED BY 'org.apache.carbondata.format'
+
TBLPROPERTIES('DICTIONARY_EXCLUDE'='city','INVERTED_INDEX'='city')
+ """)
+ sql(
+ s"""
+ LOAD DATA LOCAL INPATH '$testData1' into table index1
+ """)
+ checkAnswer(
+ sql(
+ """
+ SELECT * FROM index1 WHERE city = "Bangalore"
+ """),
+ Seq(Row(19.0, "Emily", "Bangalore")))
--- End diff --
done
---