本文整理汇总了Java中org.apache.kylin.query.schema.OLAPTable类的典型用法代码示例。如果您正苦于以下问题:Java OLAPTable类的具体用法?Java OLAPTable怎么用?Java OLAPTable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OLAPTable类属于org.apache.kylin.query.schema包,在下文中一共展示了OLAPTable类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: LookupTableEnumerator
import org.apache.kylin.query.schema.OLAPTable; //导入依赖的package包/类
public LookupTableEnumerator(OLAPContext olapContext) {
//TODO: assuming LookupTableEnumerator is handled by a cube
CubeInstance cube = (CubeInstance) olapContext.realization;
String lookupTableName = olapContext.firstTableScan.getTableName();
DimensionDesc dim = cube.getDescriptor().findDimensionByTable(lookupTableName);
if (dim == null)
throw new IllegalStateException("No dimension with derived columns found for lookup table " + lookupTableName + ", cube desc " + cube.getDescriptor());
CubeManager cubeMgr = CubeManager.getInstance(cube.getConfig());
LookupStringTable table = cubeMgr.getLookupTable(cube.getLatestReadySegment(), dim);
this.allRows = table.getAllRows();
OLAPTable olapTable = (OLAPTable) olapContext.firstTableScan.getOlapTable();
this.colDescs = olapTable.getExposedColumns();
this.current = new Object[colDescs.size()];
reset();
}
示例2: implement
import org.apache.kylin.query.schema.OLAPTable; //导入依赖的package包/类
@Override
public Result implement(EnumerableRelImplementor implementor, Prefer pref) {
if (!(implementor instanceof JavaImplementor))
throw new IllegalStateException("implementor is not JavaImplementor");
JavaImplementor javaImplementor = (JavaImplementor) implementor;
int ctxId = this.context.id;
if (javaImplementor.getParentContext() != null) {
ctxId = javaImplementor.getParentContext().id;
}
PhysType physType = PhysTypeImpl.of(javaImplementor.getTypeFactory(), this.rowType, pref.preferArray());
String execFunction = genExecFunc();
return javaImplementor.result(physType, Blocks.toBlock(Expressions.call(table.getExpression(OLAPTable.class), execFunction, javaImplementor.getRootExpression(), Expressions.constant(ctxId))));
}
示例3: implement
import org.apache.kylin.query.schema.OLAPTable; //导入依赖的package包/类
@Override
public Result implement(EnumerableRelImplementor implementor, Prefer pref) {
context.setReturnTupleInfo(rowType, columnRowType);
PhysType physType = PhysTypeImpl.of(implementor.getTypeFactory(), getRowType(), pref.preferArray());
RelOptTable factTable = context.firstTableScan.getTable();
MethodCallExpression exprCall = Expressions.call(factTable.getExpression(OLAPTable.class), "executeOLAPQuery",
implementor.getRootExpression(), Expressions.constant(context.id));
return implementor.result(physType, Blocks.toBlock(exprCall));
}
示例4: OLAPTableScan
import org.apache.kylin.query.schema.OLAPTable; //导入依赖的package包/类
public OLAPTableScan(RelOptCluster cluster, RelOptTable table, OLAPTable olapTable, int[] fields) {
super(cluster, cluster.traitSetOf(OLAPRel.CONVENTION), table);
this.olapTable = olapTable;
this.fields = fields;
this.tableName = olapTable.getTableName();
this.rowType = getRowType();
this.kylinConfig = KylinConfig.getInstanceFromEnv();
}
示例5: implement
import org.apache.kylin.query.schema.OLAPTable; //导入依赖的package包/类
@Override
public Result implement(EnumerableRelImplementor implementor, Prefer pref) {
context.setReturnTupleInfo(rowType, columnRowType);
String execFunction = genExecFunc();
PhysType physType = PhysTypeImpl.of(implementor.getTypeFactory(), getRowType(), JavaRowFormat.ARRAY);
MethodCallExpression exprCall = Expressions.call(table.getExpression(OLAPTable.class), execFunction,
implementor.getRootExpression(), Expressions.constant(context.id));
return implementor.result(physType, Blocks.toBlock(exprCall));
}
示例6: implement
import org.apache.kylin.query.schema.OLAPTable; //导入依赖的package包/类
@Override
public Result implement(EnumerableRelImplementor implementor, Prefer pref) {
Result result = null;
if (this.hasSubQuery) {
result = super.implement(implementor, pref);
} else {
PhysType physType = PhysTypeImpl.of(implementor.getTypeFactory(), getRowType(), pref.preferArray());
RelOptTable factTable = context.firstTableScan.getTable();
result = implementor.result(physType, Blocks.toBlock(Expressions.call(factTable.getExpression(OLAPTable.class), "executeIndexQuery", implementor.getRootExpression(), Expressions.constant(context.id))));
}
return result;
}
示例7: buildHiveResult
import org.apache.kylin.query.schema.OLAPTable; //导入依赖的package包/类
private Result buildHiveResult(EnumerableRelImplementor enumImplementor, Prefer pref, OLAPContext context) {
RelDataType hiveRowType = getRowType();
context.olapRowType = hiveRowType;
PhysType physType = PhysTypeImpl.of(enumImplementor.getTypeFactory(), hiveRowType, pref.preferArray());
RelOptTable factTable = context.firstTableScan.getTable();
Result result = enumImplementor.result(physType, Blocks.toBlock(Expressions.call(factTable.getExpression(OLAPTable.class), "executeHiveQuery", enumImplementor.getRootExpression())));
return result;
}
示例8: OLAPTableScan
import org.apache.kylin.query.schema.OLAPTable; //导入依赖的package包/类
public OLAPTableScan(RelOptCluster cluster, RelOptTable table, OLAPTable olapTable, int[] fields) {
super(cluster, cluster.traitSetOf(OLAPRel.CONVENTION), table);
this.olapTable = olapTable;
this.fields = fields;
this.tableName = olapTable.getTableName();
this.rowType = getRowType();
}
示例9: getOlapTable
import org.apache.kylin.query.schema.OLAPTable; //导入依赖的package包/类
public OLAPTable getOlapTable() {
return olapTable;
}