hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil Conway (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-385) Split Driver.run() into compile() + exec()
Date Wed, 08 Apr 2009 03:03:12 GMT

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

Neil Conway commented on HIVE-385:

Raghu: As far as I can tell, the query ID isn't actually used during parsing or semantic analysis.
WRT using exceptions vs. error codes, I'd be happy to do that, although I think it's orthogonal
to the issue at hand (i.e. we should be able to do MQO just fine by using multiple drivers.

Namit: Sure, that makes sense to aim for in the future. Thanks for taking a look at the patch!

Attached is a new version of the patch that introduces a separate QueryPlan object. Otherwise
the same idea as the previous patch: a single Driver can only have a single associated QueryPlan
at any time.

> 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
>         Attachments: hive_driver_compile.patch, jira_385-1.patch
> 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.

View raw message