dobesv opened a new pull request #1997: DRILL-7604: Allow session options to be 
set in HTTP queries
URL: https://github.com/apache/drill/pull/1997
 
 
   # [DRILL-7604](https://issues.apache.org/jira/browse/DRILL-7604): Allow 
session options to be set in HTTP queries
   
   ## Description
   
   Normally session options must be set using the `SET` command.  However,
   this command does not work for HTTP clients (REST API and Web UI)
   because it doesn't keep a session between requests.
   
   This changes it so that a request can contain the options you might want
   to set using the `SET` command.  It also updates the Web UI to include a
   widget to select the `store.format` option so users can specify the file
   format that will be used be `CREATE TABLE AS`.  Additional options could
   be added later if desired without much difficulty.
   
   ## Documentation
   
   ### POST /query.json
   
   Submit a query and return results.
   
   **Parameters**
   
   * `queryType`--SQL, PHYSICAL, or LOGICAL are valid types. Use only "SQL". 
Other types are for internal use only.  
   * `query`--A SQL query that runs in Drill.  
   * `autoLimit`--Limits the number of rows returned from the result set. 
(Drill 1.16+)
   * `options`--Object containing session options that you could have set using 
the SET command.  Note that numeric & boolean
     options should be provided as a number or boolean, not as a string.  A 
common iuse case would be to set `"store.format":"json"`
     to specify that `CREATE TABLE AS` should output in JSON format.
   
   ## Testing
   
   I added a JUnit test.  I also did some manual testing.
   
   (Please describe how this PR has been tested.)

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


With regards,
Apache Git Services

Reply via email to