---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
- requires:
    cluster_features:
    - "gte_v8.11.0"
    reason: "ESQL is available in 8.11+"
    test_runner_features:
    - "allowed_warnings_regex"
    - "capabilities"
---
disjoint_mappings:
- do:
    indices.create:
      index: "test1"
      body:
        mappings:
          properties:
            message1:
              type: "keyword"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    indices.create:
      index: "test2"
      body:
        mappings:
          properties:
            message2:
              type: "long"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    bulk:
      index: "test1"
      refresh: true
      body:
      - index: {}
      - message1: "foo1"
      - index: {}
      - message1: "foo2"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    bulk:
      index: "test2"
      refresh: true
      body:
      - index: {}
      - message2: 1
      - index: {}
      - message2: 2
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    allowed_warnings_regex:
    - "No limit defined, adding default limit of \\[.*\\]"
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
    esql.query:
      body:
        query: "from test1,test2 | keep message1, message2 | sort message1"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
- match:
    columns.0.name: "message1"
- match:
    columns.0.type: "keyword"
- match:
    columns.1.name: "message2"
- match:
    columns.1.type: "long"
- length:
    values: 4
- match:
    values.0.0: "foo1"
- match:
    values.0.1: null
- match:
    values.1.0: "foo2"
- match:
    values.1.1: null
- match:
    values.2.0: null
- match:
    values.3.0: null
- do:
    esql.query:
      body:
        query: "from test1,test2 | keep message1, message2 | sort message1 | limit\
          \ 2"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- match:
    columns.0.name: "message1"
- match:
    columns.0.type: "keyword"
- match:
    columns.1.name: "message2"
- match:
    columns.1.type: "long"
- length:
    values: 2
- match:
    values.0.0: "foo1"
- match:
    values.0.1: null
- match:
    values.1.0: "foo2"
- match:
    values.1.1: null
- do:
    esql.query:
      body:
        query: "from test1,test2 | keep message1, message2 | sort message1 desc nulls\
          \ last | limit 1"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- match:
    columns.0.name: "message1"
- match:
    columns.0.type: "keyword"
- match:
    columns.1.name: "message2"
- match:
    columns.1.type: "long"
- length:
    values: 1
- match:
    values.0.0: "foo2"
- match:
    values.0.1: null
- do:
    allowed_warnings_regex:
    - "No limit defined, adding default limit of \\[.*\\]"
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
    esql.query:
      body:
        query: "from test1,test2 | keep message1, message2 | sort message1, message2"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
- match:
    columns.0.name: "message1"
- match:
    columns.0.type: "keyword"
- match:
    columns.1.name: "message2"
- match:
    columns.1.type: "long"
- length:
    values: 4
- match:
    values.0.0: "foo1"
- match:
    values.0.1: null
- match:
    values.1.0: "foo2"
- match:
    values.1.1: null
- match:
    values.2.0: null
- match:
    values.2.1: 1
- match:
    values.3.0: null
- match:
    values.3.1: 2
- do:
    esql.query:
      body:
        query: "from test1,test2 | keep message1, message2 | sort message1, message2\
          \ | limit 3"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- match:
    columns.0.name: "message1"
- match:
    columns.0.type: "keyword"
- match:
    columns.1.name: "message2"
- match:
    columns.1.type: "long"
- length:
    values: 3
- match:
    values.0.0: "foo1"
- match:
    values.0.1: null
- match:
    values.1.0: "foo2"
- match:
    values.1.1: null
- match:
    values.2.0: null
- match:
    values.2.1: 1
- do:
    esql.query:
      body:
        query: "from test1,test2 | keep message1, message2 | sort message1 desc nulls\
          \ first, message2 | limit 3"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- match:
    columns.0.name: "message1"
- match:
    columns.0.type: "keyword"
- match:
    columns.1.name: "message2"
- match:
    columns.1.type: "long"
- length:
    values: 3
- match:
    values.0.0: null
- match:
    values.0.1: 1
- match:
    values.1.0: null
- match:
    values.1.1: 2
- match:
    values.2.0: "foo2"
- match:
    values.2.1: null
- do:
    esql.query:
      body:
        query: "from test1,test2 | keep message1, message2 | sort message1, message2\
          \ | limit 2"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- match:
    columns.0.name: "message1"
- match:
    columns.0.type: "keyword"
- match:
    columns.1.name: "message2"
- match:
    columns.1.type: "long"
- length:
    values: 2
- match:
    values.0.0: "foo1"
- match:
    values.0.1: null
- match:
    values.1.0: "foo2"
- match:
    values.1.1: null
- do:
    allowed_warnings_regex:
    - "No limit defined, adding default limit of \\[.*\\]"
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
    esql.query:
      body:
        query: "from test1,test2 | keep message1, message2 | sort message1 nulls first,\
          \ message2"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
- match:
    columns.0.name: "message1"
- match:
    columns.0.type: "keyword"
- match:
    columns.1.name: "message2"
- match:
    columns.1.type: "long"
- length:
    values: 4
- match:
    values.0.0: null
- match:
    values.0.1: 1
- match:
    values.1.0: null
- match:
    values.1.1: 2
- match:
    values.2.0: "foo1"
- match:
    values.2.1: null
- match:
    values.3.0: "foo2"
- match:
    values.3.1: null
- do:
    allowed_warnings_regex:
    - "No limit defined, adding default limit of \\[.*\\]"
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
    esql.query:
      body:
        query: "from test1,test2 | keep message1, message2 | sort message1 nulls first,\
          \ message2 nulls first"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
- match:
    columns.0.name: "message1"
- match:
    columns.0.type: "keyword"
- match:
    columns.1.name: "message2"
- match:
    columns.1.type: "long"
- length:
    values: 4
- match:
    values.0.0: null
- match:
    values.0.1: 1
- match:
    values.1.0: null
- match:
    values.1.1: 2
- match:
    values.2.0: "foo1"
- match:
    values.2.1: null
- match:
    values.3.0: "foo2"
- match:
    values.3.1: null
- do:
    allowed_warnings_regex:
    - "No limit defined, adding default limit of \\[.*\\]"
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
    esql.query:
      body:
        query: "from test1,test2 | keep message1, message2 | sort message1 desc nulls\
          \ first, message2 desc nulls first"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
- match:
    columns.0.name: "message1"
- match:
    columns.0.type: "keyword"
- match:
    columns.1.name: "message2"
- match:
    columns.1.type: "long"
- length:
    values: 4
- match:
    values.0.0: null
- match:
    values.0.1: 2
- match:
    values.1.0: null
- match:
    values.1.1: 1
- match:
    values.2.0: "foo2"
- match:
    values.2.1: null
- match:
    values.3.0: "foo1"
- match:
    values.3.1: null
- do:
    allowed_warnings_regex:
    - "No limit defined, adding default limit of \\[.*\\]"
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
    esql.query:
      body:
        query: "from test1,test2 | where message1 == \"foo1\" | keep message1, message2\
          \ | sort message1, message2"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
- match:
    columns.0.name: "message1"
- match:
    columns.0.type: "keyword"
- match:
    columns.1.name: "message2"
- match:
    columns.1.type: "long"
- length:
    values: 1
- match:
    values.0.0: "foo1"
- match:
    values.0.1: null
- do:
    allowed_warnings_regex:
    - "No limit defined, adding default limit of \\[.*\\]"
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
    esql.query:
      body:
        query: "from test1,test2 | where message1 == \"foo1\" or message2 == 2 | keep\
          \ message1, message2 | sort message1, message2"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
- match:
    columns.0.name: "message1"
- match:
    columns.0.type: "keyword"
- match:
    columns.1.name: "message2"
- match:
    columns.1.type: "long"
- length:
    values: 2
- match:
    values.0.0: "foo1"
- match:
    values.0.1: null
- match:
    values.1.0: null
- match:
    values.1.1: 2
- do:
    allowed_warnings_regex:
    - "No limit defined, adding default limit of \\[.*\\]"
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
    esql.query:
      body:
        query: "from test1,test2 | stats x = max(message2)"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
- match:
    columns.0.name: "x"
- match:
    columns.0.type: "long"
- length:
    values: 1
- match:
    values.0.0: 2
- do:
    allowed_warnings_regex:
    - "No limit defined, adding default limit of \\[.*\\]"
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
    esql.query:
      body:
        query: "from test1,test2 | sort message1, message2 | eval x = message1, y\
          \ = message2 + 1 | keep message1, message2, x, y"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
- match:
    columns.0.name: "message1"
- match:
    columns.0.type: "keyword"
- match:
    columns.1.name: "message2"
- match:
    columns.1.type: "long"
- match:
    columns.2.name: "x"
- match:
    columns.2.type: "keyword"
- match:
    columns.3.name: "y"
- match:
    columns.3.type: "long"
- length:
    values: 4
- match:
    values.0.0: "foo1"
- match:
    values.0.1: null
- match:
    values.0.2: "foo1"
- match:
    values.0.3: null
- match:
    values.1.0: "foo2"
- match:
    values.1.1: null
- match:
    values.1.2: "foo2"
- match:
    values.1.3: null
- match:
    values.2.0: null
- match:
    values.2.1: 1
- match:
    values.2.2: null
- match:
    values.2.3: 2
- match:
    values.3.0: null
- match:
    values.3.1: 2
- match:
    values.3.2: null
- match:
    values.3.3: 3
---
same_name_different_type:
- skip:
    features: "allowed_warnings_regex"
- do:
    indices.create:
      index: "test1"
      body:
        mappings:
          properties:
            message:
              type: "keyword"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    indices.create:
      index: "test2"
      body:
        mappings:
          properties:
            message:
              type: "long"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    bulk:
      index: "test1"
      refresh: true
      body:
      - index: {}
      - message: "foo1"
      - index: {}
      - message: "foo2"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    bulk:
      index: "test2"
      refresh: true
      body:
      - index: {}
      - message: 1
      - index: {}
      - message: 2
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    allowed_warnings_regex:
    - "Field \\[.*\\] cannot be retrieved, it is unsupported or not indexed; returning\
      \ null"
    - "No limit defined, adding default limit of \\[.*\\]"
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
    esql.query:
      body:
        query: "from test1,test2"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
- match:
    columns.0.name: "message"
- match:
    columns.0.type: "unsupported"
- length:
    values: 4
---
same_name_different_type_same_family:
- do:
    indices.create:
      index: "test1"
      body:
        mappings:
          properties:
            message:
              type: "keyword"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    indices.create:
      index: "test2"
      body:
        mappings:
          properties:
            message:
              type: "wildcard"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    bulk:
      index: "test1"
      refresh: true
      body:
      - index: {}
      - message: "foo1"
      - index: {}
      - message: "foo2"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    bulk:
      index: "test2"
      refresh: true
      body:
      - index: {}
      - message: "foo3"
      - index: {}
      - message: "foo4"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    allowed_warnings_regex:
    - "No limit defined, adding default limit of \\[.*\\]"
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
    esql.query:
      body:
        query: "from test1,test2 | sort message | keep message"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
- match:
    columns.0.name: "message"
- match:
    columns.0.type: "keyword"
- length:
    values: 4
- match:
    values.0.0: "foo1"
- match:
    values.1.0: "foo2"
- match:
    values.2.0: "foo3"
- match:
    values.3.0: "foo4"
---
_index LIKE with overly complex pattern:
- requires:
    capabilities:
    - method: "POST"
      path: "/_query"
      parameters:
      - "method"
      - "path"
      - "parameters"
      - "capabilities"
      capabilities:
      - "fix_index_like_question_mark_wildcard"
    reason: "determinization complexity for _index LIKE not handled until fix"
- do:
    indices.create:
      index: "test-complex-pattern"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    catch: "/Pattern was too complex to determinize|Determinizing automaton/"
    esql.query:
      body:
        query: "FROM test-complex-pattern METADATA _index | WHERE _index LIKE \"*a????????????????\""
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
- do:
    indices.delete:
      index: "test-complex-pattern"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - ".*rollup functionality will be removed in Elasticsearch.*"
    - "Index \\[\\.profiling-.*\\] name begins with a dot.* and will not be allowed\
      \ in a future Elasticsearch version."
    - "Parameter \\[default_metric\\] is deprecated and will be removed in a future\
      \ version"
