[ 
https://issues.apache.org/jira/browse/HIVE-385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695763#action_12695763
 ] 

Ashish Thusoo commented on HIVE-385:
------------------------------------

This also has a direct bearing on another JIRA on the full support of JDBC (as 
currently we are not able to support multiple active queries at the same time 
in the same session).

https://issues.apache.org/jira/browse/HIVE-80

 The other clients(CLI and Web Interface) don't have that problem as they are 
more interactive and also deal with a sequence of queries (there is no support 
to run queries in background with these).

One thought around that JIRA was to have a mapping from query handle to Driver 
in the HiveServer code itself. In which case keeping a single Context in the 
Driver would be ok as we could put a map there from a query handle to Driver in 
there.

Thoughts?


> Split Driver.run() into compile() + exec()
> ------------------------------------------
>
>                 Key: HIVE-385
>                 URL: https://issues.apache.org/jira/browse/HIVE-385
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Query Processor
>            Reporter: Neil Conway
>            Assignee: Neil Conway
>
> Currently, Driver.run() parses, analyzes, and then executes a given query 
> string. This isn't very flexible: it would be nice to be able to parse and 
> analyze a query to get a query plan, and then execute that query plan at a 
> later time (zero or more times). This would also be a necessary prerequisite 
> for supporting server-side prepared statements.
> I'd like to change Driver as follows:
> * Add a new method Driver.compile(String), which parses and analyzes the 
> given query string, and returns an object representing the planned query
> * Add a new method Driver.execute(Plan), which runs the given planned query
> * Reimplement run(String) as { p = compile(String); execute(p); }
> Comments welcome; I should have a candidate patch ready soon.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to