[ 
https://issues.apache.org/jira/browse/HIVE-1546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ashutosh Chauhan updated HIVE-1546:
-----------------------------------

    Attachment: hive-1546.patch

Attached patch adds the capability to Hive so that custom semantic analysis of 
query is possible before it is handed over to Hive. Plus there are few other 
miscellaneous refactoring around it. Changes include:
* Addition of SemanticAnalyzerFactoryInterface. If conf has a particular 
variable specified, a custom analyzer will be loaded and used, otherwise 
existing Hive Semantic Analyzer will be used. So, default behavior is preserved.
* Changed visibility of few methods in DDLSemanticAnalyzer and SemanticAnalyzer 
from private to protected as I wanted to override them in my custom analyzer.
* Changed file format specification in grammar, so that it can optionally take 
two more parameters (InputDriver and OutputDriver) in addition to InputFormat 
and OutputFormat. These are optional, so preserves the default behavior.
* In file format specification, currently SequenceFile, TextFile and RCFile are 
supported through keyword. Expanded that production so to accept an identifier 
so that its possible to provide support for more file formats without needing 
to change Hive grammar every time. Currently, that token results in exception 
since there are none, but when we add support for other file formats that could 
be changed. This preserves current behavior.

Note that there are no new test cases since its mostly code restructuring and 
doesnt add/modify current behavior, thus passing existing tests should suffice. 
 
I should point out most of these changes are driven by Howl and would like to 
thank John for suggesting the initial approach for these changes.
     

> Ability to plug custom Semantic Analyzers for Hive Grammar
> ----------------------------------------------------------
>
>                 Key: HIVE-1546
>                 URL: https://issues.apache.org/jira/browse/HIVE-1546
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Ashutosh Chauhan
>         Attachments: hive-1546.patch
>
>
> It will be useful if Semantic Analysis phase is made pluggable such that 
> other projects can do custom analysis of hive queries before doing metastore 
> operations on them. 

-- 
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