use of io.mycat.prototypeserver.mysql.VisualTableHandler in project Mycat2 by MyCATApache.
the class ComplierContext method getTableObservable.
public Observable<Object[]> getTableObservable(String schemaName, String tableName) {
MetadataManager metadataManager = MetaClusterCurrent.wrapper(MetadataManager.class);
TableHandler tableHandler = metadataManager.getTable(schemaName, tableName);
VisualTableHandler visualTableHandler = (VisualTableHandler) tableHandler;
return visualTableHandler.scanAll();
}
use of io.mycat.prototypeserver.mysql.VisualTableHandler in project Mycat2 by MyCATApache.
the class VisualTablePlanImpl method execute.
@Override
public Observable<VectorSchemaRoot> execute(RootContext rootContext) {
RelOptTable table = relNode.getRelNode().getTable();
MycatLogicTable logicTable = table.unwrap(MycatLogicTable.class);
TableHandler tableHandler = logicTable.getTable();
VisualTableHandler visualTableHandler = (VisualTableHandler) tableHandler;
MetadataManager metadataManager = MetaClusterCurrent.wrapper(MetadataManager.class);
MycatRelDataType mycatRelDataTypeByCalcite = relNode.getMycatRelDataTypeByCalcite();
Schema schema = toArrowSchema(mycatRelDataTypeByCalcite);
return ValuesPlan.create(schema, MycatRxJavaUtl.blockingIterable(visualTableHandler.scanAll())).execute(rootContext);
}
use of io.mycat.prototypeserver.mysql.VisualTableHandler in project Mycat2 by MyCATApache.
the class AsyncMycatDataContextImpl method getTableObservable.
@Override
public Observable<Object[]> getTableObservable(String schemaName, String tableName) {
MetadataManager metadataManager = MetaClusterCurrent.wrapper(MetadataManager.class);
TableHandler tableHandler = metadataManager.getTable(schemaName, tableName);
VisualTableHandler visualTableHandler = (VisualTableHandler) tableHandler;
return visualTableHandler.scanAll();
}
Aggregations