Skip to content

Commit 7edbf66

Browse files
committed
remove redundant check
1 parent 9c9047f commit 7edbf66

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/analysis/IgnoreNullMetrics.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
public final class IgnoreNullMetrics extends Rule<LogicalPlan, LogicalPlan> {
3434
@Override
3535
public LogicalPlan apply(LogicalPlan logicalPlan) {
36-
if (isMetricsQuery(logicalPlan) == false) {
37-
return logicalPlan;
38-
}
3936
Set<Attribute> metrics = collectMetrics(logicalPlan);
4037
if (metrics.isEmpty()) {
4138
return logicalPlan;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public void testSimple() {
6969
LogicalPlan actual = analyze("""
7070
TS test
7171
| STATS max(max_over_time(metric_1))
72+
| LIMIT 10
7273
""");
7374
Limit limit = as(actual, Limit.class);
7475
Aggregate agg = as(limit.child(), Aggregate.class);

0 commit comments

Comments
 (0)