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

JDBC format of aggregation query with date_format adds unnecessary column #111

Closed
galkk opened this issue Jul 12, 2019 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@galkk
Copy link
Contributor

galkk commented Jul 12, 2019

the query

POST _opendistro/_sql?format=jdbc
{
  "query": "SELECT date_format(utc_time, 'dd-MM-YYYY'), count(*)  from kibana_sample_data_logs group by date_format(utc_time, 'dd-MM-YYYY')"
}

Works but returns one more null column in result schema.

  "schema": [
    {
      "name": "date_format_1410573132",
      "type": "text"
    },
    {
      "name": "date_format_1025417136",
      "type": "text"
    },
    {
      "name": "COUNT(*)",
      "type": "long"
    }
  ],
  "total": 10,
  "datarows": [
    [
      "10-08-2018",
      null,
      244
    ],
    [

The JDBC result formatting is in the SQL plugin, so creating issue here

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