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
Copy file name to clipboardExpand all lines: x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/analysis/analyzer/VerifierErrorMessagesTests.java
+10
Original file line number
Diff line number
Diff line change
@@ -159,4 +159,14 @@ public void testGroupByOrderByScore() {
159
159
assertEquals("1:44: Cannot order by non-grouped column [SCORE()], expected [int]",
160
160
verify("SELECT int FROM test GROUP BY int ORDER BY SCORE()"));
161
161
}
162
+
163
+
publicvoidtestHavingOnColumn() {
164
+
assertEquals("1:42: Cannot filter HAVING on non-aggregate [int]; consider using WHERE instead",
165
+
verify("SELECT int FROM test GROUP BY int HAVING int > 2"));
166
+
}
167
+
168
+
publicvoidtestHavingOnScalar() {
169
+
assertEquals("1:42: Cannot filter HAVING on non-aggregate [int]; consider using WHERE instead",
170
+
verify("SELECT int FROM test GROUP BY int HAVING 2 < ABS(int)"));
0 commit comments