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

John Sichi commented on HIVE-1546:
----------------------------------

More specifically, for the last suggestion, where we currently have

{noformat}
      case HiveParser.TOK_TBLRCFILE:
        inputFormat = RCFILE_INPUT;
        outputFormat = RCFILE_OUTPUT;
        shared.serde = COLUMNAR_SERDE;
        storageFormat = true;
{noformat}

instead do

{noformat}
      case HiveParser.TOK_TBLRCFILE:
          processGenericFileFormat("RCFILE");
          break;
      case HiveParser.TOK_FILEFORMAT_GENERIC:
          processGenericFileFormat(child.getChild(0).getText());
          break;

...

void processGenericFileFormat(String formatName) {
    Map<String, String> props = handleGenericFileFormat(formatName);
    inputFormat = props.get(Constants.FILE_INPUT_FORMAT);
    outputFormat = props.get(Constants.FILE_OUTPUT_FORMAT);
    shared.serde = props.get(Constants.META_TABLE_SERDE);
   ...
}
{noformat}

Then in Hive's version of handleGenericFileFormat, make it return the right 
info for SEQUENCEFILE/TEXTFILE/RCFILE.

This is just a sketch, not the real code, but I hope it makes sense.


> 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
>    Affects Versions: 0.7.0
>            Reporter: Ashutosh Chauhan
>            Assignee: Ashutosh Chauhan
>             Fix For: 0.7.0
>
>         Attachments: hive-1546.patch, hive-1546_2.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