Skip to content

Commit ed498d0

Browse files
committed
fix
1 parent e7de8f4 commit ed498d0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/EsqlActionIT.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import org.elasticsearch.index.IndexSettings;
3939
import org.elasticsearch.index.mapper.DateFieldMapper;
4040
import org.elasticsearch.index.mapper.extras.MapperExtrasPlugin;
41+
import org.elasticsearch.index.query.BoolQueryBuilder;
4142
import org.elasticsearch.index.query.QueryBuilder;
4243
import org.elasticsearch.index.query.RangeQueryBuilder;
4344
import org.elasticsearch.index.shard.IndexShard;
@@ -147,6 +148,13 @@ public void testRow() {
147148
}
148149
}
149150

151+
public void testRowWithFilter() {
152+
long value = randomLongBetween(0, Long.MAX_VALUE);
153+
try (EsqlQueryResponse response = run(syncEsqlQueryRequest().query("row " + value).filter(new BoolQueryBuilder().boost(1.0f)))) {
154+
assertEquals(List.of(List.of(value)), getValuesList(response));
155+
}
156+
}
157+
150158
public void testFromStatsGroupingAvgWithSort() {
151159
testFromStatsGroupingAvgImpl("from test | stats avg(count) by data | sort data | limit 2", "data", "avg(count)");
152160
}

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlSession.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,9 @@ private void analyzeWithRetry(
694694
if (result.indices.isValid() || requestFilter != null) {
695695
// We won't run this check with no filter and no valid indices since this may lead to false positive - missing index report
696696
// when the resolution result is not valid for a different reason.
697-
// EsqlCCSUtils.updateExecutionInfoWithClustersWithNoMatchingIndices(executionInfo, result.indices, requestFilter != null);
697+
if (executionInfo.clusterInfo.isEmpty() == false) {
698+
EsqlCCSUtils.updateExecutionInfoWithClustersWithNoMatchingIndices(executionInfo, result.indices, requestFilter != null);
699+
}
698700
}
699701
LogicalPlan plan = analyzedPlan(parsed, result, executionInfo);
700702
LOGGER.debug("Analyzed plan ({}):\n{}", description, plan);

0 commit comments

Comments
 (0)