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

Wrong order of returned fields when function is used in select list #100

Closed
galkk opened this issue Jun 28, 2019 · 1 comment
Closed

Wrong order of returned fields when function is used in select list #100

galkk opened this issue Jun 28, 2019 · 1 comment
Labels
bug Something isn't working investigation JDBC/ODBC formatting This issue is related to JDBC or ODBC driver client SQL

Comments

@galkk
Copy link
Contributor

galkk commented Jun 28, 2019

When using function in select list, the order of fields in returned csv doesn't match the order in the query

POST _opendistro/_sql?format=csv
{
  "query": "SELECT ip, utc_time, date_format(utc_time, 'dd-MM-YYYY') date from kibana_sample_data_logs"
}

Expected field order: ip, utc_time, date
Actual field order: date,ip,utc_time
22-07-2018,157.4.76.38,2018-07-22T12:23:52.803Z

@galkk galkk changed the title Wrong order of returned fields in format Wrong order of returned fields when function is used in select list Jun 28, 2019
@galkk galkk added the bug Something isn't working label Jun 28, 2019
@dai-chen
Copy link
Member

dai-chen commented Jan 7, 2020

JDBC format seems able to handle this case. So this should be fixed once we merge the different code paths to one in #148.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working investigation JDBC/ODBC formatting This issue is related to JDBC or ODBC driver client SQL
Projects
None yet
Development

No branches or pull requests

3 participants