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

Jaideep Dhok commented on HIVE-4569:
------------------------------------

bq. [~vgumashta] What could be the use case for returning the query plan? And 
how will it be consumed by the client? Making it public means that any change 
to the query plan in future will break the consumer code.
It was outlined in the HS2 spec, but not implemented. Having a query plan is 
useful for tracking query progress. We have another use case where we want to 
access query plan through code, but currently there's no way to do that.

If you want to guard against changes to query plan code, then plan object needs 
to be declared at the thrift layer, and implementation has to convert between 
internal query plan (ql layer) to thrift query plan (and vice versa), like it 
is being done for data types and operation states.

bq. [~thejas] Is the thrift json structure stable if used by generic json 
parsers ?  I think we should at least state that the operator types and stage 
types can change across versions.

You need the Thrift JSON parsers to encode/decode the JSON query plan into the 
corresponding Java object.

bq. [~cwsteinbach] If I call GetQueryPlan for a statement x, and then 
subsequently call ExecuteStatement on the same statement, is it guaranteed that 
ExecuteStatement will always use the same plan that was returned earlier by 
GetQueryPlan? 
Yes, unless configuration was altered between the two calls through SET 
operations, or the conf overlay is different.
                
> GetQueryPlan api in Hive Server2
> --------------------------------
>
>                 Key: HIVE-4569
>                 URL: https://issues.apache.org/jira/browse/HIVE-4569
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>            Reporter: Amareshwari Sriramadasu
>            Assignee: Jaideep Dhok
>         Attachments: git-4569.patch, HIVE-4569.D10887.1.patch, 
> HIVE-4569.D11469.1.patch, HIVE-4569.D12231.1.patch, HIVE-4569.D12237.1.patch
>
>
> It would nice to have GetQueryPlan as thrift api. I do not see GetQueryPlan 
> api available in HiveServer2, though the wiki 
> https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Thrift+API 
> contains, not sure why it was not added.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to