Skip to content

[ES|QL] TS Command: mv_expand followed by stats when getting from multiple indices causes unexpected partial results #136928

@limotova

Description

@limotova

Example query:

ts k8s-downsa*,k8s
| mv_expand `client.ip` 
| stats  GIndJeyVxxBh = count(rate(network.total_bytes_in)) by event_log, UXhUADzsJqyi = bucket(@timestamp,1hour)
;

Causes

    java.lang.AssertionError: unexpected partial results: _clusters={details={(local)={_shards={total=2, failed=2, successful=0, skipped=0}, took=249, indices=k8s-downsa*,k8s, failures=[{node=null, reason={reason=Index 2 out of bounds for length 2, type=array_index_out_of_bounds_exception}, index=k8s, shard=0}], status=partial}}}
    Expected: (null or is <false>)
         but: was <true>
        at __randomizedtesting.SeedInfo.seed([A00043C5D036A18C:28547C1F7ECACC74]:0)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
        at org.elasticsearch.test.ESTestCase.assertThat(ESTestCase.java:2797)
        at org.elasticsearch.xpack.esql.qa.rest.RestEsqlTestCase.assertNotPartial(RestEsqlTestCase.java:1911)
        at org.elasticsearch.xpack.esql.qa.rest.RestEsqlTestCase.runEsql(RestEsqlTestCase.java:1401)
        at org.elasticsearch.xpack.esql.qa.rest.RestEsqlTestCase.runEsql(RestEsqlTestCase.java:1412)

Another failing query

ts k8s-downsampled,k8s*,k8s-d* 
| mv_expand `client.ip` 
| mv_expand event_log 
| eval  PmRBmkGLRo = events_received, `network.eth0.tx` = "ujEiVknoQAHOIMdAbD", ZFFkDcBnCVSw = substring(region, 1, 3) 
| stats  xwQJzaFP = max(rate(network.total_bytes_in)), `events_received` = count(last_over_time(network.total_bytes_out)) by dJHEEAGGTSw = bucket(@timestamp,1hour)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions