You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Gayathri (JIRA)" <ji...@apache.org> on 2019/04/25 14:06:01 UTC

[jira] [Updated] (DRILL-7218) Apache Drill API doesn't preserve the column order

     [ https://issues.apache.org/jira/browse/DRILL-7218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gayathri updated DRILL-7218:
----------------------------
    Description: 
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?

 

  was:
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?

 


> 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)