hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Thusoo (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HIVE-140) Event Based Infrastructure for Syntax Trees in the compiler
Date Tue, 09 Dec 2008 03:37:44 GMT

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

Ashish Thusoo updated HIVE-140:

    Attachment: patch-140.txt

This is a better framework for parse tree analysis and we should migrate to this gradually.
I had to cook this up for Suresh who is doing lineage extraction from the parse tree for databee.

The following are the basic framework elements:

It has three interfaces:
1. ParseTreeProcessor (with a default implementation of DefaultParseTreeProcessor that does
a pre order traversal)
2. ParseTreeEventDispatcher (with a default implementation of DefaultParseTreeEventDispatcher)
which dispatches events to a ParseTreeEventProcessor
3. ParseTreeEventProcessor (with a default implementation of DefaultParseTreeEventProcessor).

The ParseTreeEvent class defines the different kind of parse tree events. These are basically
things like saw a select clause, source table, subquery, limit etc... and we can keep adding
to these.

The dispatcher code registers for the interested events the event processor that needs to
be called. The default dispatcher calls these processors for the event in the order that they
were registered.

The process function in the tree processor calls the dispatcher for these events and the default
one does that in a pre order way.

I think a framework like this will help us modularize SemanticAnalyzer in a much better way.

> Event Based Infrastructure for Syntax Trees in the compiler
> -----------------------------------------------------------
>                 Key: HIVE-140
>                 URL: https://issues.apache.org/jira/browse/HIVE-140
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Query Processor
>            Reporter: Ashish Thusoo
>            Assignee: Ashish Thusoo
>         Attachments: patch-140.txt
> In order to refactor SemanticAnalyzer into a bunch of different components, we need to
move more modular mechanisms of doing semantic analysis. One of the missing pieces here is
the event based infrastructure for analyzing ASTs in the Semantic Analyzer. We will first
use this infrastructure for lineage tools and then migrate the rest of the Semantic Analyzer
to this infrastructure over time.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message