public class RowResolver extends Object implements Serializable
Constructor and Description |
---|
RowResolver() |
Modifier and Type | Method and Description |
---|---|
static boolean |
add(RowResolver rrToAddTo,
RowResolver rrToAddFrom) |
static boolean |
add(RowResolver rrToAddTo,
RowResolver rrToAddFrom,
int numColumns) |
boolean |
addMappingOnly(String tab_alias,
String col_alias,
ColumnInfo colInfo) |
RowResolver |
duplicate() |
ColumnInfo |
get(String tab_alias,
String col_alias)
Gets the column Info to tab_alias.col_alias type of a column reference.
|
String[] |
getAlternateMappings(String internalName) |
ArrayList<ColumnInfo> |
getColumnInfos() |
static RowResolver |
getCombinedRR(RowResolver leftRR,
RowResolver rightRR)
Return a new row resolver that is combination of left RR and right RR.
|
ColumnInfo |
getExpression(ASTNode node)
Retrieves the ColumnInfo corresponding to a source expression which
exactly matches the string rendering of the given ASTNode.
|
Map<String,ASTNode> |
getExpressionMap() |
ASTNode |
getExpressionSource(ASTNode node)
Retrieves the source expression matching a given ASTNode's
string rendering exactly.
|
HashMap<String,ColumnInfo> |
getFieldMap(String tabAlias) |
HashMap<String,String[]> |
getInvRslvMap() |
boolean |
getIsExprResolver() |
int |
getPosition(String internalName) |
List<String> |
getReferenceableColumnAliases(String tableAlias,
int max)
Get a list of aliases for non-hidden columns
|
RowSchema |
getRowSchema() |
HashMap<String,LinkedHashMap<String,ColumnInfo>> |
getRslvMap() |
Set<String> |
getTableNames() |
boolean |
hasTableAlias(String tab_alias) |
void |
put(String tab_alias,
String col_alias,
ColumnInfo colInfo) |
void |
putExpression(ASTNode node,
ColumnInfo colInfo)
Puts a resolver entry corresponding to a source expression which is to be
used for identical expression recognition (e.g.
|
boolean |
putWithCheck(String tabAlias,
String colAlias,
String internalName,
ColumnInfo newCI)
Adds column to RR, checking for duplicate columns.
|
String[] |
reverseLookup(String internalName) |
void |
setExpressionMap(Map<String,ASTNode> expressionMap) |
void |
setExprResolver(boolean isExprResolver) |
void |
setInvRslvMap(HashMap<String,String[]> invRslvMap) |
void |
setIsExprResolver(boolean isExprResolver) |
void |
setRowSchema(RowSchema rowSchema) |
void |
setRslvMap(HashMap<String,LinkedHashMap<String,ColumnInfo>> rslvMap) |
String |
toString() |
public void putExpression(ASTNode node, ColumnInfo colInfo)
public ColumnInfo getExpression(ASTNode node) throws SemanticException
SemanticException
public ASTNode getExpressionSource(ASTNode node)
public void put(String tab_alias, String col_alias, ColumnInfo colInfo)
public boolean addMappingOnly(String tab_alias, String col_alias, ColumnInfo colInfo)
public boolean hasTableAlias(String tab_alias)
public ColumnInfo get(String tab_alias, String col_alias) throws SemanticException
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 forSemanticException
public ArrayList<ColumnInfo> getColumnInfos()
public List<String> getReferenceableColumnAliases(String tableAlias, int max)
max
- the maximum number of columns to returnpublic HashMap<String,ColumnInfo> getFieldMap(String tabAlias)
public int getPosition(String internalName)
public void setIsExprResolver(boolean isExprResolver)
public boolean getIsExprResolver()
public RowSchema getRowSchema()
public HashMap<String,LinkedHashMap<String,ColumnInfo>> getRslvMap()
public void setExprResolver(boolean isExprResolver)
public void setRowSchema(RowSchema rowSchema)
public void setRslvMap(HashMap<String,LinkedHashMap<String,ColumnInfo>> rslvMap)
public static boolean add(RowResolver rrToAddTo, RowResolver rrToAddFrom, int numColumns) throws SemanticException
SemanticException
public boolean putWithCheck(String tabAlias, String colAlias, String internalName, ColumnInfo newCI) throws SemanticException
SemanticException
public static boolean add(RowResolver rrToAddTo, RowResolver rrToAddFrom) throws SemanticException
SemanticException
public static RowResolver getCombinedRR(RowResolver leftRR, RowResolver rightRR) throws SemanticException
leftRR
- rightRR
- SemanticException
public RowResolver duplicate()
Copyright © 2017 The Apache Software Foundation. All rights reserved.