You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2018/11/15 14:47:13 UTC

[GitHub] cgivre commented on issue #1539: DRILL-6847: Add Query Metadata to RESTful Interface

cgivre commented on issue #1539: DRILL-6847: Add Query Metadata to RESTful Interface
URL: https://github.com/apache/drill/pull/1539#issuecomment-439064781
 
 
   HI @kkhatua 
   A few things.  First re: breaking backward compatibility.  Since the RESTful interface returns JSON KV pairs, and since all this is doing is introducing an additional key (metadata) which contains the column types, I don't think it will break anything since it isn't doing anything to the existing keys.  No real way to know unless a lot of people complain, but the tools which I use that use the RESTful interface are not affected.
   
   Secondly, regarding star queries, I did try a few on my local machine and you get a dump of all the column types. IE if your data contains 4 columns and you do a `SELECT *` you get:
   
   ```
     "metadata": [
       "INT",
       "VARCHAR",
       "VARCHAR",
       "VARCHAR"
     ],
   ```
   Since this code gets called when results are returned, I don't think schema inconsistencies matter.  IE if the query fails due to schema inconsistencies, you won't get metadata, and if it succeeds you get the results. 
   
   @arina-ielchiieva Would you like to see additional arrays with precision and scale with null values if it is not needed.  IE 
   ```
   "scale": [
   4,
   null,
   null,
   null
   ]
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services