Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2281#discussion_r187257562
--- Diff:
integration/spark-common-test/src/test/scala/org/apache/carbondata/datamap/lucene/LuceneFineGrainDataMapSuite.scala
---
@@ -733,6 +732,26 @@ class LuceneFineGrainDataMapSuite extends QueryTest
with BeforeAndAfterAll {
sql("DROP TABLE table1")
}
+ test("test lucene fine grain empty string") {
+ sql("DROP TABLE IF EXISTS datamap_test_01")
+
CarbonProperties.getInstance().addProperty(CarbonCommonConstants.CARBON_LUCENE_EMPTY_STRING_ENABLE,"null")
+ sql(
+ "create table datamap_test_01(id int,fn string,ln string)stored by
'carbondata' " +
+ "tblproperties('sort_columns'='fn','sort_scope'='local_sort')")
+ sql(
+ s"""
+ | CREATE DATAMAP dm_datamap ON TABLE datamap_test_01
+ | USING 'lucene'
+ | DMProperties('INDEX_COLUMNS'='fn,ln')
+ """.stripMargin)
+ sql("insert into table datamap_test_01 select 1,'abc',''")
+ sql("insert into table datamap_test_01 select 2,'abc def','ghi'")
+ checkAnswer(sql("select *from datamap_test_01 where ln like '%'"),
+ sql("select *from datamap_test_01 where text_match('ln:*')"))
--- End diff --
In current master, what is the result set for this query? I think it is
acceptable that result is different from non-lucene table query, since lucene
has its own behavior. Our goal is to comply to lucene behavior but not make
everything the same as like query
---