org.apache.hadoop.hive.ql.parse
Class RowResolver
java.lang.Object
org.apache.hadoop.hive.ql.parse.RowResolver
public class RowResolver
- extends Object
Implementation of the Row Resolver
RowResolver
public RowResolver()
put
public void put(String tab_alias,
String col_alias,
ColumnInfo colInfo)
hasTableAlias
public boolean hasTableAlias(String tab_alias)
get
public ColumnInfo get(String tab_alias,
String col_alias)
throws SemanticException
- Gets the column Info to tab_alias.col_alias type of a column reference. I the tab_alias is not
provided as can be the case with an non aliased column, this function looks up the column in all
the table aliases in this row resolver and returns the match. It also throws an exception if
the column is found in multiple table aliases. If no match is found a null values is returned.
This allows us to interpret both select t.c1 type of references and select c1 kind of refereneces.
The later kind are what we call non aliased column references in the query.
- Parameters:
tab_alias
- The table alias to match (this is null if the column reference is non aliased)col_alias
- The column name that is being searched for
- Returns:
- ColumnInfo
- Throws:
SemanticException
getColumnInfos
public Vector<ColumnInfo> getColumnInfos()
getFieldMap
public HashMap<String,ColumnInfo> getFieldMap(String tab_alias)
getPosition
public int getPosition(String internalName)
getTableNames
public Set<String> getTableNames()
reverseLookup
public String[] reverseLookup(String internalName)
setIsExprResolver
public void setIsExprResolver(boolean isExprResolver)
getIsExprResolver
public boolean getIsExprResolver()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009 The Apache Software Foundation