|
18 | 18 |
|
19 | 19 | suite("test_no_index_match", "p0") {
|
20 | 20 | // define a sql table
|
21 |
| - def testTable_unique = "httplogs_unique" |
| 21 | + def testTable = "test_no_index_match" |
22 | 22 |
|
23 | 23 | def create_httplogs_unique_table = {testTablex ->
|
24 | 24 | // multi-line sql
|
@@ -77,35 +77,38 @@ suite("test_no_index_match", "p0") {
|
77 | 77 | }
|
78 | 78 |
|
79 | 79 | try {
|
80 |
| - sql "DROP TABLE IF EXISTS ${testTable_unique}" |
81 |
| - create_httplogs_unique_table.call(testTable_unique) |
82 |
| - load_httplogs_data.call(testTable_unique, 'httplogs_unique', 'true', 'json', 'documents-1000.json') |
| 80 | + sql "DROP TABLE IF EXISTS ${testTable}" |
| 81 | + create_httplogs_unique_table.call(testTable) |
| 82 | + load_httplogs_data.call(testTable, 'test_no_index_match', 'true', 'json', 'documents-1000.json') |
83 | 83 |
|
84 |
| - sql """ INSERT INTO ${testTable_unique} VALUES (1, '1', '', 1, 1); """ |
| 84 | + sql """ INSERT INTO ${testTable} VALUES (1, '1', '', 1, 1); """ |
85 | 85 |
|
86 | 86 | sql 'sync'
|
| 87 | + sql """ set enable_common_expr_pushdown = true """ |
87 | 88 |
|
88 | 89 | try {
|
89 |
| - qt_sql """ select count() from ${testTable_unique} where (request match_any 'hm bg'); """ |
90 |
| - qt_sql """ select count() from ${testTable_unique} where (request match_all 'hm bg'); """ |
91 |
| - qt_sql """ select count() from ${testTable_unique} where (request match_phrase 'hm bg'); """ |
92 |
| - qt_sql """ select count() from ${testTable_unique} where (request match_phrase_prefix 'hm b'); """ |
93 |
| - qt_sql """ select count() from ${testTable_unique} where (request match_regexp 'la'); """ |
| 90 | + qt_sql """ select count() from ${testTable} where (request match_any 'hm bg'); """ |
| 91 | + qt_sql """ select count() from ${testTable} where (request match_all 'hm bg'); """ |
| 92 | + qt_sql """ select count() from ${testTable} where (request match_phrase 'hm bg'); """ |
| 93 | + qt_sql """ select count() from ${testTable} where (request match_phrase_prefix 'hm b'); """ |
| 94 | + qt_sql """ select count() from ${testTable} where (request match_regexp 'la'); """ |
94 | 95 |
|
95 |
| - qt_sql """ select count() from ${testTable_unique} where (request match_phrase '欧冶工业品'); """ |
96 |
| - qt_sql """ select count() from ${testTable_unique} where (request match_phrase_prefix '欧冶工业品'); """ |
| 96 | + qt_sql """ select count() from ${testTable} where (request match_phrase '欧冶工业品'); """ |
| 97 | + qt_sql """ select count() from ${testTable} where (request match_phrase_prefix '欧冶工业品'); """ |
| 98 | + |
| 99 | + qt_sql """ select count() from ${testTable} where (request match_regexp ''); """ |
97 | 100 | } finally {
|
98 | 101 | }
|
99 | 102 |
|
100 | 103 | try {
|
101 |
| - sql """ select /*+ SET_VAR(enable_match_without_inverted_index = 0) */ count() from ${testTable_unique} where (request match_phrase 'hm bg'); """ |
| 104 | + sql """ select /*+ SET_VAR(enable_match_without_inverted_index = 0) */ count() from ${testTable} where (request match_phrase 'hm bg'); """ |
102 | 105 | } catch (Exception e) {
|
103 | 106 | log.info(e.getMessage());
|
104 | 107 | assertTrue(e.getMessage().contains("match_phrase not support execute_match"))
|
105 | 108 | }
|
106 | 109 |
|
107 | 110 | try {
|
108 |
| - sql """ select /*+ SET_VAR(enable_match_without_inverted_index = 0) */ count() from ${testTable_unique} where (request match_phrase_prefix 'hm b'); """ |
| 111 | + sql """ select /*+ SET_VAR(enable_match_without_inverted_index = 0) */ count() from ${testTable} where (request match_phrase_prefix 'hm b'); """ |
109 | 112 | } catch (Exception e) {
|
110 | 113 | log.info(e.getMessage());
|
111 | 114 | assertTrue(e.getMessage().contains("match_phrase_prefix not support execute_match"))
|
|
0 commit comments