本文整理汇总了Java中org.apache.calcite.plan.RelOptTable.ToRelContext类的典型用法代码示例。如果您正苦于以下问题:Java ToRelContext类的具体用法?Java ToRelContext怎么用?Java ToRelContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ToRelContext类属于org.apache.calcite.plan.RelOptTable包,在下文中一共展示了ToRelContext类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toRel
import org.apache.calcite.plan.RelOptTable.ToRelContext; //导入依赖的package包/类
@Override
public RelNode toRel(ToRelContext context, RelOptTable relOptTable) {
ViewExpansionContext.ViewExpansionToken token = null;
try {
RelDataType rowType = relOptTable.getRowType();
RelNode rel;
if (viewExpansionContext.isImpersonationEnabled()) {
token = viewExpansionContext.reserveViewExpansionToken(viewOwner);
rel = context.expandView(rowType, view.getSql(), token.getSchemaTree(), view.getWorkspaceSchemaPath());
} else {
rel = context.expandView(rowType, view.getSql(), view.getWorkspaceSchemaPath());
}
// If the View's field list is not "*", create a cast.
if (!view.isDynamic() && !view.hasStar()) {
rel = RelOptUtil.createCastRel(rel, rowType, true);
}
return rel;
} finally {
if (token != null) {
token.release();
}
}
}
示例2: toRel
import org.apache.calcite.plan.RelOptTable.ToRelContext; //导入依赖的package包/类
@Override
public RelNode toRel(ToRelContext context, RelOptTable relOptTable) {
ViewExpansionContext.ViewExpansionToken token = null;
try {
RelDataType rowType = relOptTable.getRowType();
token = viewExpansionContext.reserveViewExpansionToken(viewOwner);
SchemaPlus schemaPlus = token.getSchemaTree();
return context.expandView(rowType, getView().getSql(), schemaPlus, getView().getWorkspaceSchemaPath(), null).rel;
} finally {
if (token != null) {
token.release();
}
}
}
示例3: toRel
import org.apache.calcite.plan.RelOptTable.ToRelContext; //导入依赖的package包/类
@Override
public ScanCrel toRel(ToRelContext toRelContext, RelOptTable relOptTable) {
return new ScanCrel(toRelContext.getCluster(), toRelContext.getCluster().traitSetOf(Convention.NONE), dataset.getStoragePluginId(), dataset, null, 1.0d, true);
}
示例4: toRel
import org.apache.calcite.plan.RelOptTable.ToRelContext; //导入依赖的package包/类
@Override
public RelNode toRel(ToRelContext toRelContext, RelOptTable relOptTable) {
return new ConvertibleScan(toRelContext.getCluster(), toRelContext.getCluster().traitSet(), relOptTable, plugin,
new ConversionContext.NamespaceConversionContext(schemaConfig.getAuthContext(), datasetConfig));
}
示例5: toRel
import org.apache.calcite.plan.RelOptTable.ToRelContext; //导入依赖的package包/类
@Override
public RelNode toRel(ToRelContext context, RelOptTable table) {
return drillTable.toRel(context, table);
}
示例6: toRel
import org.apache.calcite.plan.RelOptTable.ToRelContext; //导入依赖的package包/类
@Override
public RelNode toRel(ToRelContext context, RelOptTable relOptTable) {
int fieldCount = relOptTable.getRowType().getFieldCount();
int[] fields = identityList(fieldCount);
return new OLAPTableScan(context.getCluster(), relOptTable, this, fields);
}
示例7: toRel
import org.apache.calcite.plan.RelOptTable.ToRelContext; //导入依赖的package包/类
@Override public RelNode toRel(ToRelContext context, RelOptTable relOptTable) {
final RelOptCluster cluster = context.getCluster();
return new PigTableScan(cluster, cluster.traitSetOf(PigRel.CONVENTION), relOptTable);
}