Skip to content

Commit

Permalink
More test
Browse files Browse the repository at this point in the history
  • Loading branch information
nik9000 committed Jul 10, 2024
1 parent 2a38bc8 commit b786c1c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,6 @@ FROM airports
abbrev:keyword | type:keyword | scalerank:integer | min_scalerank:integer
GWL | [mid, military] | 9 | [2, 4]
;


// NOCOMMIT INLINESTATS before and after a bunch of stuff
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.elasticsearch.xpack.esql.plan.logical.Eval;
import org.elasticsearch.xpack.esql.plan.logical.Filter;
import org.elasticsearch.xpack.esql.plan.logical.Grok;
import org.elasticsearch.xpack.esql.plan.logical.InlineStats;
import org.elasticsearch.xpack.esql.plan.logical.Limit;
import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan;
import org.elasticsearch.xpack.esql.plan.logical.Lookup;
Expand Down Expand Up @@ -146,6 +147,7 @@ public void testPhysicalPlanEntries() {
Eval.class,
Filter.class,
Grok.class,
InlineStats.class,
Join.class,
Limit.class,
LocalRelation.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void testTwoLayer() {
assertThat(Phased.extractFirstPhase(finalPhase), nullValue());
}

private class Dummy extends UnaryPlan implements Phased {
public class Dummy extends UnaryPlan implements Phased {
Dummy(Source source, LogicalPlan child) {
super(source, child);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import org.elasticsearch.xpack.esql.plan.logical.Dissect;
import org.elasticsearch.xpack.esql.plan.logical.Grok;
import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan;
import org.elasticsearch.xpack.esql.plan.logical.PhasedTests;
import org.elasticsearch.xpack.esql.plan.logical.join.JoinType;
import org.elasticsearch.xpack.esql.plan.physical.EsQueryExec;
import org.elasticsearch.xpack.esql.plan.physical.EsStatsQueryExec.Stat;
Expand Down Expand Up @@ -113,7 +114,7 @@ public class EsqlNodeSubclassTests<T extends B, B extends Node<B>> extends NodeS
private static final Predicate<String> CLASSNAME_FILTER = className -> {
boolean esqlCore = className.startsWith("org.elasticsearch.xpack.esql.core") != false;
boolean esqlProper = className.startsWith("org.elasticsearch.xpack.esql") != false;
return esqlCore || esqlProper;
return (esqlCore || esqlProper) && className.equals(PhasedTests.Dummy.class.getName()) == false;
};

/**
Expand All @@ -124,7 +125,7 @@ public class EsqlNodeSubclassTests<T extends B, B extends Node<B>> extends NodeS
@SuppressWarnings("rawtypes")
public static List<Object[]> nodeSubclasses() throws IOException {
return subclassesOf(Node.class, CLASSNAME_FILTER).stream()
.filter(c -> testClassFor(c) == null)
.filter(c -> testClassFor(c) == null || c != PhasedTests.Dummy.class)
.map(c -> new Object[] { c })
.toList();
}
Expand Down

0 comments on commit b786c1c

Please sign in to comment.