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

select count(distinct age) bug. #439

Closed
zerix opened this issue Apr 24, 2020 · 2 comments
Closed

select count(distinct age) bug. #439

zerix opened this issue Apr 24, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@zerix
Copy link

zerix commented Apr 24, 2020

when I use
{
"query": "select distinct customer_gender from kibana_sample_data_ecommerce"
}
It will be return the right result male/female.

but when I run :
{
"query": "select count(distinct customer_gender) from kibana_sample_data_ecommerce"
}

It will return the error result:

{
"schema": [
{
"name": "COUNT(customer_gender)",
"type": "integer"
}
],
"total": 1,
"datarows": [
[
4675
]
],
"size": 1,
"status": 200
}

I used with es 7.6.1 and SQL plugin 1.6.0.

@penghuo penghuo added the bug Something isn't working label Apr 25, 2020
@penghuo
Copy link
Contributor

penghuo commented Apr 25, 2020

Thanks for reporting the issue.

@penghuo
Copy link
Contributor

penghuo commented Apr 25, 2020

Expected Elasticsearch DSL

{
  "from" : 0,
  "size" : 0,
  "_source" : {
    "includes" : [
      "COUNT"
    ],
    "excludes" : [ ]
  },
  "aggregations" : {
    "COUNT_0" : {
      "cardinality" : {
        "field" : "customer_gender"
      }
    }
  }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants