You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQL: Verify Full-Text Search functions not allowed in SELECT
Add a verification that full-text search functions are not
allowed in the SELECT clause, so that a nice error message is
returned to the user early instead of an "ugly" exception.
Fixes: elastic#47446
Copy file name to clipboardExpand all lines: x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/analysis/analyzer/VerifierErrorMessagesTests.java
+8-1
Original file line number
Diff line number
Diff line change
@@ -511,7 +511,7 @@ public void testUnsupportedTypeInHierarchy() {
511
511
assertEquals("1:8: Cannot use field [x.y] with unsupported type [foobar]", error("SELECT x.y FROM test"));
512
512
}
513
513
514
-
publicvoidtestTermEqualitOnInexact() {
514
+
publicvoidtestTermEqualityOnInexact() {
515
515
assertEquals("1:26: [text = 'value'] cannot operate on first argument field of data type [text]: " +
516
516
"No keyword/multi-field defined exact matches for [text]; define one or use MATCH/QUERY instead",
517
517
error("SELECT * FROM test WHERE text = 'value'"));
@@ -712,6 +712,13 @@ public void testInvalidTypeForRLikeMatch() {
712
712
error("SELECT * FROM test WHERE text RLIKE 'foo'"));
0 commit comments