本文整理汇总了Java中org.apache.tajo.engine.planner.logical.RelationNode类的典型用法代码示例。如果您正苦于以下问题:Java RelationNode类的具体用法?Java RelationNode怎么用?Java RelationNode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RelationNode类属于org.apache.tajo.engine.planner.logical包,在下文中一共展示了RelationNode类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolveDatabase
import org.apache.tajo.engine.planner.logical.RelationNode; //导入依赖的package包/类
public String resolveDatabase(QueryBlock block, String tableName) throws PlanningException {
List<String> found = new ArrayList<String>();
for (RelationNode relation : block.getRelations()) {
// check alias name or table name
if (CatalogUtil.extractSimpleName(relation.getCanonicalName()).equals(tableName) ||
CatalogUtil.extractSimpleName(relation.getTableName()).equals(tableName)) {
// obtain the database name
found.add(CatalogUtil.extractQualifier(relation.getTableName()));
}
}
if (found.size() == 0) {
return null;
} else if (found.size() > 1) {
throw new PlanningException("Ambiguous table name \"" + tableName + "\"");
}
return found.get(0);
}
示例2: getRelation
import org.apache.tajo.engine.planner.logical.RelationNode; //导入依赖的package包/类
public RelationNode getRelation(String name) {
if (canonicalNameToRelationMap.containsKey(name)) {
return canonicalNameToRelationMap.get(name);
}
if (aliasMap.containsKey(name)) {
return canonicalNameToRelationMap.get(aliasMap.get(name).get(0));
}
return null;
}
示例3: getRelation
import org.apache.tajo.engine.planner.logical.RelationNode; //导入依赖的package包/类
public RelationNode getRelation(String name) {
return nameToRelationMap.get(CatalogUtil.normalizeIdentifier(name));
}
示例4: addRelation
import org.apache.tajo.engine.planner.logical.RelationNode; //导入依赖的package包/类
public void addRelation(RelationNode relation) {
nameToRelationMap.put(CatalogUtil.normalizeIdentifier(relation.getCanonicalName()), relation);
}
示例5: getRelations
import org.apache.tajo.engine.planner.logical.RelationNode; //导入依赖的package包/类
public Collection<RelationNode> getRelations() {
return this.nameToRelationMap.values();
}
示例6: addRelation
import org.apache.tajo.engine.planner.logical.RelationNode; //导入依赖的package包/类
public void addRelation(RelationNode relation) {
if (relation.hasAlias()) {
TUtil.putToNestedList(aliasMap, relation.getTableName(), relation.getCanonicalName());
}
canonicalNameToRelationMap.put(relation.getCanonicalName(), relation);
}
示例7: getRelations
import org.apache.tajo.engine.planner.logical.RelationNode; //导入依赖的package包/类
public Collection<RelationNode> getRelations() {
return this.canonicalNameToRelationMap.values();
}