Package net.hydromatic.linq4j.expressions

Examples of net.hydromatic.linq4j.expressions.BlockStatement


    // not quite sure where this list was supposed to be set earlier, leaving it null got me back the full result set

    final List<String> fieldNameList = rowType.getFieldNames();
    // final List<String> fieldNameList = null;
    BlockStatement expr = new BlockBuilder().append(
        Expressions.call(
            OF_METHOD,
            Expressions.constant(plan), //
            Expressions.call(Arrays.class, "asList", //
                Expressions.newArrayInit(String.class, Functions.apply(fieldNameList, TO_LITERAL)) //
View Full Code Here


    // create a filter to remove records that don't meet the expression
    Expression nullToFalse = Expressions.call( Functions.class, "falseIfNull", condition );
    Expression not = Expressions.not( nullToFalse ); // matches #isRemove semantics in Filter

    statements.add( Expressions.return_( null, not ) );
    BlockStatement block = statements.toBlock();
    String expression = Expressions.toString( block );

    LOG.debug( "filter parameters: {}", incomingFields );
    LOG.debug( "filter expression: {}", expression );
View Full Code Here

    record = Expressions.new_( getConstructor(), record );

    statements.add( Expressions.return_( null, record ) );

    BlockStatement block = statements.toBlock();
    String expression = Expressions.toString( block );

    Fields outgoingFields = createTypedFields( cluster, program.getOutputRowType(), false );

    LOG.debug( "function parameters: {}", program.getInputRowType() );
View Full Code Here

    TableHolder tableHolder = new TableHolder( physType, tableDef, getPlatformBroker(), planner );
    long ordinal = CascadingTapEnumerable.addHolder( tableHolder );
    Constructor<CascadingTapEnumerable> constructor = CascadingEnumerableRel.getConstructorFor( CascadingTapEnumerable.class );

    BlockStatement block = new BlockBuilder().append( Expressions.new_( constructor, Expressions.constant( ordinal ) ) ).toBlock();
    return implementor.result( physType, block );
    }
View Full Code Here

    VolcanoPlanner planner = (VolcanoPlanner) getCluster().getPlanner();

    PhysType physType = PhysTypeImpl.of( implementor.getTypeFactory(), input.getRowType(), JavaRowFormat.ARRAY );

    BlockStatement block;

    if( branch.tuples != null )
      block = handleInsert( branch, planner );
    else if( branch.platformBroker instanceof PlannerPlatformBroker // used by the SQLPlanner
      block = handlePrepare( branch, physType, planner );
View Full Code Here

TOP

Related Classes of net.hydromatic.linq4j.expressions.BlockStatement

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.