Skip to content

Commit 492daae

Browse files
committed
Add column tests
1 parent d2df0e1 commit 492daae

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.elasticsearch.common.settings.Settings;
1414
import org.elasticsearch.index.query.QueryBuilder;
1515
import org.elasticsearch.index.query.RangeQueryBuilder;
16-
import org.elasticsearch.test.junit.annotations.TestLogging;
1716
import org.elasticsearch.xpack.esql.VerificationException;
1817

1918
import java.io.IOException;
@@ -32,7 +31,6 @@
3231
import static org.hamcrest.Matchers.is;
3332
import static org.hamcrest.Matchers.lessThanOrEqualTo;
3433

35-
@TestLogging(value = "org.elasticsearch.xpack.esql:DEBUG", reason = "debug")
3634
public class CrossClusterQueryWithFiltersIT extends AbstractCrossClusterTestCase {
3735
@Override
3836
protected Map<String, Boolean> skipUnavailableForRemoteClusters() {
@@ -187,6 +185,8 @@ public void testTimestampFilterFromQuery() {
187185
try (EsqlQueryResponse resp = runQuery("from logs-*,c*:logs-*", randomBoolean(), filter)) {
188186
List<List<Object>> values = getValuesList(resp);
189187
assertThat(values, hasSize(docsTest1));
188+
// FIXME: this is currently inconsistent with the non-wildcard case, since empty wildcard is not an error,
189+
// the second field-caps does not happen and the remote fields are not added to the response.
190190
// assertThat(resp.columns().stream().map(ColumnInfoImpl::name).toList(), hasItems("@timestamp", "tag-local", "tag-cluster-a"));
191191

192192
EsqlExecutionInfo executionInfo = resp.getExecutionInfo();
@@ -209,7 +209,7 @@ public void testTimestampFilterFromQuery() {
209209
try (EsqlQueryResponse resp = runQuery("from logs-1,c*:logs-2", randomBoolean(), filter)) {
210210
List<List<Object>> values = getValuesList(resp);
211211
assertThat(values, hasSize(0));
212-
// assertThat(resp.columns().stream().map(ColumnInfoImpl::name).toList(), hasItems("@timestamp", "tag-local", "tag-cluster-a"));
212+
assertThat(resp.columns().stream().map(ColumnInfoImpl::name).toList(), hasItems("@timestamp", "tag-local", "tag-cluster-a"));
213213

214214
EsqlExecutionInfo executionInfo = resp.getExecutionInfo();
215215
assertNotNull(executionInfo);
@@ -233,7 +233,7 @@ public void testTimestampFilterFromQuery() {
233233
try (EsqlQueryResponse resp = runQuery("from logs-*,c*:logs-*", randomBoolean(), filter)) {
234234
List<List<Object>> values = getValuesList(resp);
235235
assertThat(values, hasSize(0));
236-
// assertThat(resp.columns().stream().map(ColumnInfoImpl::name).toList(), hasItems("@timestamp", "tag-local", "tag-cluster-a"));
236+
assertThat(resp.columns().stream().map(ColumnInfoImpl::name).toList(), hasItems("@timestamp", "tag-local", "tag-cluster-a"));
237237

238238
EsqlExecutionInfo executionInfo = resp.getExecutionInfo();
239239
assertNotNull(executionInfo);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ public void executePlan(
436436
final var remoteClusters = clusterComputeHandler.getRemoteClusters(clusterToConcreteIndices, clusterToOriginalIndices);
437437
for (ClusterComputeHandler.RemoteCluster cluster : remoteClusters) {
438438
if (execInfo.getCluster(cluster.clusterAlias()).getStatus() != EsqlExecutionInfo.Cluster.Status.RUNNING) {
439-
// if the cluster is already in the terminal state, no need to call it
439+
// if the cluster is already in the terminal state from the planning stage, no need to call it
440440
continue;
441441
}
442442
clusterComputeHandler.startComputeOnRemoteCluster(

0 commit comments

Comments
 (0)