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

Ashutosh Chauhan commented on HIVE-123:
---------------------------------------

Sure. DDLWork was sort of a container class which held various *Desc object out 
of which only one was active at a time. DDLTask used to check which desc of 
DDLWork is non-null, execute it and return. This patch makes all the *Desc in 
DDLWork extend from DDLDesc so DDLWork can refer to generic DDLDesc. This helps 
in getting rid of setting and getting of all the different Desc and thus making 
DDLWork extremely small and lightweight. There is one downside of it though. 
Instead of specific Explain annotation on get*Desc(), now there can only be a 
generic annotation on getDesc(). So, in explain of create Table DDL earlier 
used to appear "Create Table Operator" now appears "DDL Operator".
                
> refactor DDL code (both DDLWork and DDLTask)
> --------------------------------------------
>
>                 Key: HIVE-123
>                 URL: https://issues.apache.org/jira/browse/HIVE-123
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Ashutosh Chauhan
>              Labels: cleanup, refactoring
>         Attachments: hive-123.patch
>
>
> It might be good to break DDLTask into separate tasks. The abstract class 
> DDLWork can have various subclasses:
> showTablesWork, DescribeTableWork etc. and a separate task for each of them. 
> This will make them completely independent.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to