本文整理汇总了Java中org.apache.calcite.plan.RelOptCluster.traitSetOf方法的典型用法代码示例。如果您正苦于以下问题:Java RelOptCluster.traitSetOf方法的具体用法?Java RelOptCluster.traitSetOf怎么用?Java RelOptCluster.traitSetOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.calcite.plan.RelOptCluster
的用法示例。
在下文中一共展示了RelOptCluster.traitSetOf方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRel
import org.apache.calcite.plan.RelOptCluster; //导入方法依赖的package包/类
@Override
public RelNode getRel(final RelOptCluster cluster, final RelOptTable relOptTable, final ConversionContext.NamespaceConversionContext relContext) {
final DatasetConfig datasetConfig = relContext.getDatasetConfig();
BatchSchema schema = BatchSchema.fromDataset(datasetConfig);
return new OldScanCrel(cluster, new RelOptTableWrapper(datasetConfig.getFullPathList(), relOptTable),
cluster.traitSetOf(Convention.NONE),
BatchSchema.fromDataset(datasetConfig).toCalciteRecordType(cluster.getTypeFactory()),
new HBaseGroupScan(
ImpersonationUtil.getProcessUserName()/*impersonation not supported for HBASE*/,
this,
new HBaseScanSpec(datasetConfig.getName()),
OldAbstractGroupScan.ALL_COLUMNS,
schema,
datasetConfig.getFullPathList()
),
null,
OldScanRelBase.DEFAULT_ROW_COUNT_DISCOUNT
);
}
示例2: getRel
import org.apache.calcite.plan.RelOptCluster; //导入方法依赖的package包/类
@Override
public RelNode getRel(final RelOptCluster cluster, final RelOptTable relOptTable, final InfoSchemaConversionContext relContext) {
try {
final String username = ImpersonationUtil.getProcessUserName();
final GroupScan scan = getPhysicalScan(username, new JSONOptions(relContext.getSelection()),
relContext.getFullPath(), OldAbstractGroupScan.ALL_COLUMNS);
return new OldScanCrel(cluster, relOptTable, cluster.traitSetOf(Convention.NONE), relContext.getDataType(), scan, null, OldScanRelBase.DEFAULT_ROW_COUNT_DISCOUNT);
} catch (IOException e) {
throw new RuntimeException("unable to create group scan", e);
}
}
示例3: getRel
import org.apache.calcite.plan.RelOptCluster; //导入方法依赖的package包/类
@Override
public RelNode getRel(final RelOptCluster cluster, final RelOptTable relOptTable, final StaticTableConversionContext relContext) {
try {
final String username = ImpersonationUtil.getProcessUserName();
final GroupScan scan = getPhysicalScan(username, new JSONOptions(relContext.getSelection()),
relContext.getFullPath(), OldAbstractGroupScan.ALL_COLUMNS);
return new OldScanCrel(cluster, relOptTable, cluster.traitSetOf(Convention.NONE), relContext.getDataType(), scan, null, OldScanRelBase.DEFAULT_ROW_COUNT_DISCOUNT);
} catch (final IOException e) {
throw Throwables.propagate(e);
}
}