Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

<geopoint_column>.<lat/lon> cannot pass semantic analyzer #329

Open
chloe-zh opened this issue Dec 26, 2019 · 1 comment
Open

<geopoint_column>.<lat/lon> cannot pass semantic analyzer #329

chloe-zh opened this issue Dec 26, 2019 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers SQL

Comments

@chloe-zh
Copy link
Member

Data sample: kibana_sample_data_flights

Example query:

POST _opendistro/_sql
{
  "query": "select DestLocation.lon from kibana_sample_data_flights limit 3"
}

Output:

{
  "error": {
    "reason": "Invalid SQL query",
    "details": "Field [DestLocation.lon] cannot be found or used here.",
    "type": "SemanticAnalysisException"
  },
  "status": 400
}

Expected result:

{
  "took" : 0,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 10000,
      "relation" : "gte"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "kibana_sample_data_flights",
        "_type" : "_doc",
        "_id" : "JmzfNG8Bks2M7WBSzhwy",
        "_score" : 1.0,
        "_source" : {
          "DestLocation" : {
            "lon" : "151.177002"
          }
        }
      },
      {
        "_index" : "kibana_sample_data_flights",
        "_type" : "_doc",
        "_id" : "J2zfNG8Bks2M7WBSzhwy",
        "_score" : 1.0,
        "_source" : {
          "DestLocation" : {
            "lon" : "12.3519"
          }
        }
      },
      {
        "_index" : "kibana_sample_data_flights",
        "_type" : "_doc",
        "_id" : "KGzfNG8Bks2M7WBSzhwy",
        "_score" : 1.0,
        "_source" : {
          "DestLocation" : {
            "lon" : "12.3519"
          }
        }
      }
    ]
  }
}
@chloe-zh chloe-zh added the enhancement New feature or request label Dec 26, 2019
@chloe-zh
Copy link
Member Author

Related issue: #313

@chloe-zh chloe-zh added bug Something isn't working good first issue Good for newcomers and removed enhancement New feature or request labels May 6, 2020
@dai-chen dai-chen added the SQL label Sep 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers SQL
Projects
None yet
Development

No branches or pull requests

2 participants