Skip to content

Commit f8f4863

Browse files
committed
Fix tests in release mode
1 parent 6b6d68d commit f8f4863

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -390,14 +390,16 @@ public void testAggsExpressionsInStatsAggs() {
390390
"1:19: grouping key [e] already specified in the STATS BY clause",
391391
error("from test | stats e BY e = languages + emp_no")
392392
);
393-
assertEquals(
394-
"1:19: grouping key [[q].[e]] already specified in the STATS BY clause",
395-
error("from test | stats [q].[e] BY [q].[e]")
396-
);
397-
assertEquals(
398-
"1:19: Cannot specify grouping expression [[q].[e]] as an aggregate",
399-
error("from test | stats [q].[e] BY x = [q].[e]")
400-
);
393+
if (EsqlCapabilities.Cap.NAME_QUALIFIERS.isEnabled()) {
394+
assertEquals(
395+
"1:19: grouping key [[q].[e]] already specified in the STATS BY clause",
396+
error("from test | stats [q].[e] BY [q].[e]")
397+
);
398+
assertEquals(
399+
"1:19: Cannot specify grouping expression [[q].[e]] as an aggregate",
400+
error("from test | stats [q].[e] BY x = [q].[e]")
401+
);
402+
}
401403

402404
var message = error("from test | stats languages + emp_no BY e = languages + emp_no");
403405
assertThat(

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/parser/QualifierTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ public void testQualifiersAreDisabledInReleaseBuilds() {
4646
* TODO: LOOKUP JOIN's qualifier will need to make it into the parsed plan node.
4747
*/
4848
public void testSimpleQualifierInExpression() {
49+
assumeTrue("Requires qualifier support", EsqlCapabilities.Cap.NAME_QUALIFIERS.isEnabled());
50+
4951
String query = "ROW x = 1 | LOOKUP JOIN lu_idx AS qualified ON x | WHERE [qualified].[field]";
5052

5153
LogicalPlan plan = statement(query);

0 commit comments

Comments
 (0)