Package net.hydromatic.optiq

Examples of net.hydromatic.optiq.DataContext


    final RelTraitSet desiredTraits = getDesiredRootTraitSet(rootRel);
    final Program program1 =
        new Program() {
          public RelNode run(RelOptPlanner planner, RelNode rel,
              RelTraitSet requiredOutputTraits) {
            final DataContext dataContext = context.getDataContext();
            planner.setExecutor(new RexExecutorImpl(dataContext));

            for (Materialization materialization : materializations) {
              planner.addMaterialization(
                  new RelOptMaterialization(materialization.tableRel,
View Full Code Here


    Frameworks.withPrepare(
        new Frameworks.PrepareAction<Void>() {
          public Void apply(RelOptCluster cluster, RelOptSchema relOptSchema,
              SchemaPlus rootSchema, OptiqServerStatement statement) {
            final RexBuilder rexBuilder = cluster.getRexBuilder();
            DataContext dataContext =
                Schemas.createDataContext(statement.getConnection());
            final RexExecutorImpl executor = new RexExecutorImpl(dataContext);
            action.check(rexBuilder, executor);
            return null;
          }
View Full Code Here

   * Can change the value of the variable and execute again. */
  @Test public void testVariableExecution() throws Exception {
    check(new Action() {
      public void check(RexBuilder rexBuilder, RexExecutorImpl executor) {
        Object[] values = new Object[1];
        final DataContext testContext = new TestDataContext(values);
        final RelDataType varchar = rexBuilder.getTypeFactory().createSqlType(
            SqlTypeName.VARCHAR);
        final RelDataType integer = rexBuilder.getTypeFactory().createSqlType(
            SqlTypeName.INTEGER);
        // optiq is internally creating the creating the input ref via a
View Full Code Here

    planner.setRoot(rootRel);

    final RelTraitSet desiredTraits = getDesiredRootTraitSet(rootRel);
    final Program program = getProgram();

    final DataContext dataContext = context.getDataContext();
    planner.setExecutor(new RexExecutorImpl(dataContext));

    for (Materialization materialization : materializations) {
      planner.addMaterialization(
          new RelOptMaterialization(materialization.tableRel,
View Full Code Here

    Frameworks.withPrepare(
        new Frameworks.PrepareAction<Void>() {
          public Void apply(RelOptCluster cluster, RelOptSchema relOptSchema,
              SchemaPlus rootSchema, OptiqServerStatement statement) {
            final RexBuilder rexBuilder = cluster.getRexBuilder();
            DataContext dataContext =
                Schemas.createDataContext(statement.getConnection());
            final RexExecutorImpl executor = new RexExecutorImpl(dataContext);
            action.check(rexBuilder, executor);
            return null;
          }
View Full Code Here

   * Can change the value of the variable and execute again. */
  @Test public void testVariableExecution() throws Exception {
    check(new Action() {
      public void check(RexBuilder rexBuilder, RexExecutorImpl executor) {
        Object[] values = new Object[1];
        final DataContext testContext = new TestDataContext(values);
        final RelDataType varchar = rexBuilder.getTypeFactory().createSqlType(
            SqlTypeName.VARCHAR);
        final RelDataType integer = rexBuilder.getTypeFactory().createSqlType(
            SqlTypeName.INTEGER);
        // optiq is internally creating the creating the input ref via a
View Full Code Here

    planner.setRoot(rootRel);

    final RelTraitSet desiredTraits = getDesiredRootTraitSet(rootRel);
    final Program program = getProgram();

    final DataContext dataContext = context.getDataContext();
    planner.setExecutor(new RexExecutorImpl(dataContext));

    for (Materialization materialization : materializations) {
      planner.addMaterialization(
          new RelOptMaterialization(materialization.tableRel,
View Full Code Here

TOP

Related Classes of net.hydromatic.optiq.DataContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.