Package com.facebook.presto.byteCode.expression

Examples of com.facebook.presto.byteCode.expression.ByteCodeExpression


                .pushThis()
                .invokeConstructor(Object.class);

        constructor.comment("Set channel fields");
        for (int index = 0; index < channelFields.size(); index++) {
            ByteCodeExpression channel = compilerContext.getVariable("channels")
                    .invoke("get", Object.class, constantInt(index))
                    .cast(type(List.class, com.facebook.presto.spi.block.Block.class));

            constructor.append(compilerContext.getVariable("this").setField(channelFields.get(index), channel));
        }

        constructor.comment("Set join channel fields");
        for (int index = 0; index < joinChannelFields.size(); index++) {
            ByteCodeExpression joinChannel = compilerContext.getVariable("channels")
                    .invoke("get", Object.class, constantInt(joinChannels.get(index)))
                    .cast(type(List.class, com.facebook.presto.spi.block.Block.class));

            constructor.append(compilerContext.getVariable("this").setField(joinChannelFields.get(index), joinChannel));
        }
View Full Code Here


                arg("outputChannelOffset", int.class))
                .getBody();

        for (int index = 0; index < channelFields.size(); index++) {
            Type type = types.get(index);
            ByteCodeExpression typeExpression = constantType(compilerContext, callSiteBinder, type);

            ByteCodeExpression block = compilerContext
                    .getVariable("this")
                    .getField(channelFields.get(index))
                    .invoke("get", Object.class, compilerContext.getVariable("blockIndex"))
                    .cast(com.facebook.presto.spi.block.Block.class);
View Full Code Here

        Variable resultVariable = hashPositionMethod.getCompilerContext().declareVariable(int.class, "result");
        hashPositionMethod.getBody().push(0).putVariable(resultVariable);

        for (int index = 0; index < joinChannelTypes.size(); index++) {
            ByteCodeExpression type = constantType(compilerContext, callSiteBinder, joinChannelTypes.get(index));

            ByteCodeExpression block = compilerContext
                    .getVariable("this")
                    .getField(joinChannelFields.get(index))
                    .invoke("get", Object.class, compilerContext.getVariable("blockIndex"))
                    .cast(com.facebook.presto.spi.block.Block.class);
View Full Code Here

        Variable resultVariable = hashPositionMethod.getCompilerContext().declareVariable(int.class, "result");
        hashPositionMethod.getBody().push(0).putVariable(resultVariable);

        for (int index = 0; index < joinChannelTypes.size(); index++) {
            ByteCodeExpression type = constantType(compilerContext, callSiteBinder, joinChannelTypes.get(index));

            ByteCodeExpression block = compilerContext
                    .getVariable("blocks")
                    .getElement(index)
                    .cast(com.facebook.presto.spi.block.Block.class);

            hashPositionMethod
View Full Code Here

                arg("leftBlockPosition", int.class),
                arg("rightPosition", int.class),
                arg("rightBlocks", com.facebook.presto.spi.block.Block[].class));

        for (int index = 0; index < joinChannelTypes.size(); index++) {
            ByteCodeExpression type = constantType(compilerContext, callSiteBinder, joinChannelTypes.get(index));

            ByteCodeExpression leftBlock = compilerContext
                    .getVariable("this")
                    .getField(joinChannelFields.get(index))
                    .invoke("get", Object.class, compilerContext.getVariable("leftBlockIndex"))
                    .cast(com.facebook.presto.spi.block.Block.class);

            ByteCodeExpression rightBlock = compilerContext
                    .getVariable("rightBlocks")
                    .getElement(index);

            LabelNode checkNextField = new LabelNode("checkNextField");
            hashPositionMethod
View Full Code Here

                arg("leftBlockPosition", int.class),
                arg("rightBlockIndex", int.class),
                arg("rightBlockPosition", int.class));

        for (int index = 0; index < joinChannelTypes.size(); index++) {
            ByteCodeExpression type = constantType(compilerContext, callSiteBinder, joinChannelTypes.get(index));

            Variable blockIndex = compilerContext.getVariable("leftBlockIndex");
            ByteCodeExpression leftBlock = compilerContext
                    .getVariable("this")
                    .getField(joinChannelFields.get(index))
                    .invoke("get", Object.class, blockIndex)
                    .cast(com.facebook.presto.spi.block.Block.class);

            ByteCodeExpression rightBlock = compilerContext
                    .getVariable("this")
                    .getField(joinChannelFields.get(index))
                    .invoke("get", Object.class, compilerContext.getVariable("rightBlockIndex"))
                    .cast(com.facebook.presto.spi.block.Block.class);
View Full Code Here

            Block block = new Block(context)
                    .setDescription("compare channel " + sortChannel + " " + sortOrder);

            Type sortType = sortTypes.get(i);

            ByteCodeExpression leftBlock = context.getVariable("pagesIndex")
                    .invoke("getChannel", ObjectArrayList.class, constantInt(sortChannel))
                    .invoke("get", Object.class, leftBlockIndex)
                    .cast(com.facebook.presto.spi.block.Block.class);

            ByteCodeExpression rightBlock = context.getVariable("pagesIndex")
                    .invoke("getChannel", ObjectArrayList.class, constantInt(sortChannel))
                    .invoke("get", Object.class, rightBlockIndex)
                    .cast(com.facebook.presto.spi.block.Block.class);

            block.append(getStatic(SortOrder.class, sortOrder.name())
View Full Code Here

                .pushThis()
                .invokeConstructor(Object.class);

        constructor.comment("Set channel fields");
        for (int index = 0; index < channelFields.size(); index++) {
            ByteCodeExpression channel = compilerContext.getVariable("channels")
                    .invoke("get", Object.class, constantInt(index))
                    .cast(type(List.class, com.facebook.presto.spi.block.Block.class));

            constructor.append(compilerContext.getVariable("this").setField(channelFields.get(index), channel));
        }

        constructor.comment("Set join channel fields");
        for (int index = 0; index < joinChannelFields.size(); index++) {
            ByteCodeExpression joinChannel = compilerContext.getVariable("channels")
                    .invoke("get", Object.class, constantInt(joinChannels.get(index)))
                    .cast(type(List.class, com.facebook.presto.spi.block.Block.class));

            constructor.append(compilerContext.getVariable("this").setField(joinChannelFields.get(index), joinChannel));
        }
View Full Code Here

                arg("outputChannelOffset", int.class))
                .getBody();

        for (int index = 0; index < channelFields.size(); index++) {
            Type type = types.get(index);
            ByteCodeExpression typeExpression = constantType(compilerContext, callSiteBinder, type);

            ByteCodeExpression block = compilerContext
                    .getVariable("this")
                    .getField(channelFields.get(index))
                    .invoke("get", Object.class, compilerContext.getVariable("blockIndex"))
                    .cast(com.facebook.presto.spi.block.Block.class);
View Full Code Here

        Variable resultVariable = hashPositionMethod.getCompilerContext().declareVariable(int.class, "result");
        hashPositionMethod.getBody().push(0).putVariable(resultVariable);

        for (int index = 0; index < joinChannelTypes.size(); index++) {
            ByteCodeExpression type = constantType(compilerContext, callSiteBinder, joinChannelTypes.get(index));

            ByteCodeExpression block = compilerContext
                    .getVariable("this")
                    .getField(joinChannelFields.get(index))
                    .invoke("get", Object.class, compilerContext.getVariable("blockIndex"))
                    .cast(com.facebook.presto.spi.block.Block.class);
View Full Code Here

TOP

Related Classes of com.facebook.presto.byteCode.expression.ByteCodeExpression

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.