Examples of ifTrue()


Examples of com.facebook.presto.byteCode.control.IfStatement.IfStatementBuilder.ifTrue()

                                .addAll(nCopies(projectionInputs.size(), type(com.facebook.presto.spi.block.Block.class)))
                                .add(type(BlockBuilder.class))
                                .build());
            }
        }
        ifStatement.ifTrue(trueBlock);

        forLoopBody.append(ifStatement.build());
        filterAndProjectMethod.getBody().append(forLoop.body(forLoopBody).build());

        filterAndProjectMethod.getBody().ret();
View Full Code Here

Examples of com.facebook.presto.byteCode.control.IfStatement.IfStatementBuilder.ifTrue()

                .pushThis()
                .getVariable("cursor")
                .invokeVirtual(classDefinition.getType(), "filter", type(boolean.class), type(RecordCursor.class)));

        Block trueBlock = new Block(compilerContext);
        ifStatement.ifTrue(trueBlock);
        if (projections.isEmpty()) {
            // pageBuilder.declarePosition();
            trueBlock.getVariable("pageBuilder").invokeVirtual(PageBuilder.class, "declarePosition", void.class);
        }
        else {
View Full Code Here

Examples of com.facebook.presto.byteCode.control.IfStatement.IfStatementBuilder.ifTrue()

    {
        IfStatementBuilder ifStatementBuilder = new IfStatementBuilder(compilerContext);

        ifStatementBuilder.condition(new Block(compilerContext).append(blockRef.invoke("isNull", boolean.class, blockPosition)));

        ifStatementBuilder.ifTrue(new Block(compilerContext).push(0));

        ifStatementBuilder.ifFalse(new Block(compilerContext).append(type.invoke("hash", int.class, blockRef, blockPosition)));

        return ifStatementBuilder.build();
    }
View Full Code Here

Examples of com.facebook.presto.byteCode.control.IfStatement.IfStatementBuilder.ifTrue()

        ifStatementBuilder.condition(new Block(compilerContext)
                .append(leftBlock.invoke("isNull", boolean.class, leftBlockPosition))
                .append(rightBlock.invoke("isNull", boolean.class, rightBlockPosition))
                .append(OpCode.IOR));

        ifStatementBuilder.ifTrue(new Block(compilerContext)
                .append(leftBlock.invoke("isNull", boolean.class, leftBlockPosition))
                .append(rightBlock.invoke("isNull", boolean.class, rightBlockPosition))
                .append(OpCode.IAND));

        ifStatementBuilder.ifFalse(new Block(compilerContext).append(type.invoke("equalTo", boolean.class, leftBlock, leftBlockPosition, rightBlock, rightBlockPosition)));
View Full Code Here

Examples of com.facebook.presto.byteCode.control.IfStatement.IfStatementBuilder.ifTrue()

                .getVariable(sessionVariable)
                .getVariable(cursorVariable)
                .invokeVirtual(classDefinition.getType(), "filter", type(boolean.class), type(ConnectorSession.class), type(RecordCursor.class)));

        Block trueBlock = new Block(context);
        ifStatement.ifTrue(trueBlock);
        if (projections == 0) {
            // pageBuilder.declarePosition();
            trueBlock.getVariable(pageBuilderVariable)
                    .invokeVirtual(PageBuilder.class, "declarePosition", void.class);
        }
View Full Code Here

Examples of com.facebook.presto.byteCode.control.IfStatement.IfStatementBuilder.ifTrue()

                        "project_" + projectionIndex,
                        type(void.class),
                        ImmutableList.<ParameterizedType>builder().addAll(nCopies(inputChannels.size(), type(BlockCursor.class))).add(type(BlockBuilder.class)).build());
            }
        }
        ifStatement.ifTrue(trueBlock);

        forLoopBody.append(ifStatement.build());
        filterAndProjectMethod.getBody().append(forLoop.body(forLoopBody).build());

        //
View Full Code Here

Examples of com.facebook.presto.byteCode.control.IfStatement.IfStatementBuilder.ifTrue()

                .pushThis()
                .getVariable("cursor")
                .invokeVirtual(classDefinition.getType(), "filter", type(boolean.class), type(RecordCursor.class)));

        Block trueBlock = new Block(compilerContext);
        ifStatement.ifTrue(trueBlock);
        if (projections.isEmpty()) {
            // pageBuilder.declarePosition();
            trueBlock.getVariable("pageBuilder").invokeVirtual(PageBuilder.class, "declarePosition", void.class);
        }
        else {
View Full Code Here

Examples of com.facebook.presto.byteCode.control.IfStatement.IfStatementBuilder.ifTrue()

        IfStatementBuilder ifLeftIsNull = ifStatementBuilder(context)
                .comment("if left wasNull...")
                .condition(new Block(context).getVariable("wasNull"));

        LabelNode end = new LabelNode("end");
        ifLeftIsNull.ifTrue(new Block(context)
                .comment("clear the null flag, pop left value off stack, and push left null flag on the stack (true)")
                .putVariable("wasNull", false)
                .pop(left.getType()) // discard left value
                .push(true));
View Full Code Here

Examples of com.facebook.presto.byteCode.control.IfStatement.IfStatementBuilder.ifTrue()

        IfStatementBuilder ifRightIsNull = ifStatementBuilder(context)
                .comment("if right wasNull...")
                .condition(new Block(context).getVariable("wasNull"));

        // this leaves a single boolean on the stack which is ignored since the value in NULL
        ifRightIsNull.ifTrue(new Block(context)
                .comment("right was null, pop the right value off the stack; wasNull flag remains set to TRUE")
                .pop(right.getType()));

        LabelNode rightIsTrue = new LabelNode("rightIsTrue");
        ifRightIsNull.ifFalse(new Block(context)
View Full Code Here

Examples of com.facebook.presto.byteCode.control.IfStatement.IfStatementBuilder.ifTrue()

        IfStatementBuilder ifLeftIsNull = ifStatementBuilder(context)
                .comment("if left wasNull...")
                .condition(new Block(context).getVariable("wasNull"));

        LabelNode end = new LabelNode("end");
        ifLeftIsNull.ifTrue(new Block(context)
                .comment("clear the null flag, pop left value off stack, and push left null flag on the stack (true)")
                .putVariable("wasNull", false)
                .pop(left.getType()) // discard left value
                .push(true));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.