当前位置: 首页>>代码示例>>Java>>正文


Java OLAPTable类代码示例

本文整理汇总了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();
    }
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:21,代码来源:LookupTableEnumerator.java

示例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))));
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:18,代码来源:OLAPTableScan.java

示例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));
}
 
开发者ID:apache,项目名称:kylin,代码行数:12,代码来源:OLAPJoinRel.java

示例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();
}
 
开发者ID:apache,项目名称:kylin,代码行数:9,代码来源:OLAPTableScan.java

示例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));
}
 
开发者ID:apache,项目名称:kylin,代码行数:12,代码来源:OLAPTableScan.java

示例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;
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:15,代码来源:OLAPJoinRel.java

示例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;
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:11,代码来源:OLAPToEnumerableConverter.java

示例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();
}
 
开发者ID:KylinOLAP,项目名称:Kylin,代码行数:8,代码来源:OLAPTableScan.java

示例9: getOlapTable

import org.apache.kylin.query.schema.OLAPTable; //导入依赖的package包/类
public OLAPTable getOlapTable() {
    return olapTable;
}
 
开发者ID:apache,项目名称:kylin,代码行数:4,代码来源:OLAPTableScan.java


注:本文中的org.apache.kylin.query.schema.OLAPTable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。