[ 
https://issues.apache.org/jira/browse/DRILL-7218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16826106#comment-16826106
 ] 

Volodymyr Vysotskyi commented on DRILL-7218:
--------------------------------------------

[~Gayathri01], the order of the columns is preserved in the {{columns}} list. 
{{rows}} is just a list of maps, where every map shouldn't preserve the order 
of columns.

> Apache Drill API doesn't preserve the column order
> --------------------------------------------------
>
>                 Key: DRILL-7218
>                 URL: https://issues.apache.org/jira/browse/DRILL-7218
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.14.0
>            Reporter: Gayathri
>            Priority: Blocker
>              Labels: REST_API, drill
>
> When we try to query through Apache Drill REST API, the returned response 
> doesn't maintain the column order as given in the query.
> +Example:+ *Request:* \{"queryType" : "SQL","query" : "select a,b,c from 
> dfs.`\files\test.json`"};
> *Response:* { "queryId": "233ff474-0902-828b-9efd-0a0bd57eee51",
>  "columns": [
>  "a",
>  "b",
>  "c"
>  ],
>  "rows": [
> { "b": "abc", "c": " xyz", "a": "uxv"}, \{ "b": "abc", "c": " xyz", "a": 
> "uxv"}
> ]
>  }
> Is there any way we can maintain the column order through REST API call?
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to