@@ -35,6 +35,12 @@ public void multipleFromTest() throws IOException, SqlParseException, SQLFeature
3535 Assert .assertEquals (1004 , response .getTotalHits ());
3636 }
3737
38+ @ Test
39+ public void typeWithWildcardTest () throws IOException , SqlParseException , SQLFeatureNotSupportedException {
40+ SearchHits response = query (String .format ("SELECT * FROM %s/phrase* LIMIT 1000" , TEST_INDEX ));
41+ Assert .assertEquals (8 , response .getTotalHits ());
42+ }
43+
3844
3945 @ Test
4046 public void selectSpecificFields () throws IOException , SqlParseException , SQLFeatureNotSupportedException {
@@ -67,7 +73,7 @@ public void selectAliases() throws IOException, SqlParseException, SQLFeatureNot
6773
6874 @ Test
6975 public void equallityTest () throws SqlParseException , SQLFeatureNotSupportedException {
70- SearchHits response = query (String .format ("select * from %s where city = 'Nogal' LIMIT 1000" , TEST_INDEX ));
76+ SearchHits response = query (String .format ("select * from %s/phrase where city = 'Nogal' LIMIT 1000" , TEST_INDEX ));
7177 SearchHit [] hits = response .getHits ();
7278
7379 // assert the results is correct according to accounts.json data.
@@ -80,7 +86,7 @@ public void equallityTest() throws SqlParseException, SQLFeatureNotSupportedExce
8086 // in some cases, depends on the analasis, we might want choose better behavior for equallity.
8187 @ Test
8288 public void equallityTest_phrase () throws SqlParseException , SQLFeatureNotSupportedException {
83- SearchHits response = query (String .format ("SELECT * FROM %s WHERE phrase = 'quick fox here' LIMIT 1000" , TEST_INDEX ));
89+ SearchHits response = query (String .format ("SELECT * FROM %s/phrase WHERE phrase = 'quick fox here' LIMIT 1000" , TEST_INDEX ));
8490 SearchHit [] hits = response .getHits ();
8591
8692 // assert the results is correct according to accounts.json data.
@@ -228,7 +234,7 @@ public void notBetweenTest() throws IOException, SqlParseException, SQLFeatureNo
228234
229235 @ Test
230236 public void inTest () throws IOException , SqlParseException , SQLFeatureNotSupportedException {
231- SearchHits response = query (String .format ("SELECT age FROM %s WHERE age IN (20, 22) LIMIT 1000" , TEST_INDEX ));
237+ SearchHits response = query (String .format ("SELECT age FROM %s/phrase WHERE age IN (20, 22) LIMIT 1000" , TEST_INDEX ));
232238 SearchHit [] hits = response .getHits ();
233239 for (SearchHit hit : hits ) {
234240 int age = (int ) hit .getSource ().get ("age" );
@@ -239,7 +245,7 @@ public void inTest() throws IOException, SqlParseException, SQLFeatureNotSupport
239245
240246 @ Test
241247 public void inTestWithStrings () throws IOException , SqlParseException , SQLFeatureNotSupportedException {
242- SearchHits response = query (String .format ("SELECT phrase FROM %s WHERE phrase IN ('quick fox here', 'fox brown') LIMIT 1000" , TEST_INDEX ));
248+ SearchHits response = query (String .format ("SELECT phrase FROM %s/phrase WHERE phrase IN ('quick fox here', 'fox brown') LIMIT 1000" , TEST_INDEX ));
243249 SearchHit [] hits = response .getHits ();
244250 Assert .assertEquals (2 , response .getTotalHits ());
245251 for (SearchHit hit : hits ) {
0 commit comments