Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL: Unknown index verification exception when index does not contain any mappings #52865

Closed
tobio opened this issue Feb 27, 2020 · 3 comments · Fixed by #52967
Closed

SQL: Unknown index verification exception when index does not contain any mappings #52865

tobio opened this issue Feb 27, 2020 · 3 comments · Fixed by #52967
Assignees

Comments

@tobio
Copy link
Member

tobio commented Feb 27, 2020

Elasticsearch version (bin/elasticsearch --version): 7.6.0 on ESS

Description of the problem including expected versus actual behavior:

Steps to reproduce:

Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.

  1. Create a new index, only supplying index settings
  2. Execute a SQL query against the index

Expected:
An unknown column verification exception, or a specific exception for this edge-case.

Actual:
An Unknown index verification exception. This is misleading, making debugging for the user more difficult.

{
        "type" : "verification_exception",
        "reason" : "Found 1 problem(s)\nline 1:15: Unknown index [broken]"
}

Full repro:

PUT broken
{ 
  "settings": {
    "index": {
        "final_pipeline": "a"
    }
  }
}

PUT working
{
  "mappings": {
    "properties": {
      "for": {
        "type": "keyword"
      }
    }
  }, 
  "settings": {
      "index": {
          "final_pipeline": "a"
      }
  }
}

GET _sql // FAILS
{
  "query": "SELECT * FROM broken"
}

GET _sql
{
  "query": "SELECT * FROM working"
}
@tobio tobio added the :Analytics/SQL SQL querying label Feb 27, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/SQL)

@astefan
Copy link
Contributor

astefan commented Feb 28, 2020

#34719

@tobio
Copy link
Member Author

tobio commented Mar 2, 2020

🎉thanks for the quick change @astefan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants