Examples of HashJoinOperatorFactory


Examples of com.facebook.presto.operator.HashJoinOperator.HashJoinOperatorFactory

        // probe
        List<Page> probeInput = rowPagesBuilder(SINGLE_VARBINARY, SINGLE_LONG, SINGLE_LONG)
                .addSequencePage(1000, 0, 1000, 2000)
                .build();
        HashJoinOperatorFactory joinOperatorFactory = HashJoinOperator.innerJoin(
                0,
                hashBuilderOperatorFactory.getHashSupplier(),
                ImmutableList.of(SINGLE_VARBINARY, SINGLE_LONG, SINGLE_LONG),
                0);

        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, FIXED_INT_64, FIXED_INT_64, VARIABLE_BINARY, FIXED_INT_64, FIXED_INT_64))
                .row("20", 1020, 2020, "20", 30, 40)
                .row("21", 1021, 2021, "21", 31, 41)
View Full Code Here

Examples of com.facebook.presto.operator.HashJoinOperator.HashJoinOperatorFactory

                .row((String) null)
                .row((String) null)
                .row("a")
                .row("b")
                .build();
        HashJoinOperatorFactory joinOperatorFactory = HashJoinOperator.innerJoin(
                0,
                hashBuilderOperatorFactory.getHashSupplier(),
                ImmutableList.of(SINGLE_VARBINARY),
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, VARIABLE_BINARY))
                .row("a", "a")
                .row("a", "a")
View Full Code Here

Examples of com.facebook.presto.operator.HashJoinOperator.HashJoinOperatorFactory

        List<Page> probeInput = rowPagesBuilder(SINGLE_VARBINARY)
                .row("a")
                .row("b")
                .row("c")
                .build();
        HashJoinOperatorFactory joinOperatorFactory = HashJoinOperator.innerJoin(
                0,
                hashBuilderOperatorFactory.getHashSupplier(),
                ImmutableList.of(SINGLE_VARBINARY),
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, VARIABLE_BINARY))
                .row("a", "a")
                .row("a", "a")
View Full Code Here

Examples of com.facebook.presto.operator.HashJoinOperator.HashJoinOperatorFactory

                .row("a")
                .row("b")
                .row((String) null)
                .row("c")
                .build();
        HashJoinOperatorFactory joinOperatorFactory = HashJoinOperator.innerJoin(
                0,
                hashBuilderOperatorFactory.getHashSupplier(),
                ImmutableList.of(SINGLE_VARBINARY),
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, VARIABLE_BINARY))
                .row("a", "a")
                .row("a", "a")
View Full Code Here

Examples of com.facebook.presto.operator.HashJoinOperator.HashJoinOperatorFactory

        // probe
        List<Page> probeInput = rowPagesBuilder(SINGLE_VARBINARY, SINGLE_LONG, SINGLE_LONG)
                .addSequencePage(15, 20, 1020, 2020)
                .build();
        HashJoinOperatorFactory joinOperatorFactory = HashJoinOperator.outerJoin(
                0,
                hashBuilderOperatorFactory.getHashSupplier(),
                ImmutableList.of(SINGLE_VARBINARY, SINGLE_LONG, SINGLE_LONG),
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, FIXED_INT_64, FIXED_INT_64, VARIABLE_BINARY, FIXED_INT_64, FIXED_INT_64))
                .row("20", 1020, 2020, "20", 30, 40)
View Full Code Here

Examples of com.facebook.presto.operator.HashJoinOperator.HashJoinOperatorFactory

                .row((String) null)
                .row((String) null)
                .row("a")
                .row("b")
                .build();
        HashJoinOperatorFactory joinOperatorFactory = HashJoinOperator.outerJoin(
                0,
                hashBuilderOperatorFactory.getHashSupplier(),
                ImmutableList.of(SINGLE_VARBINARY),
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, VARIABLE_BINARY))
                .row("a", "a")
                .row(null, null)
View Full Code Here

Examples of com.facebook.presto.operator.HashJoinOperator.HashJoinOperatorFactory

        List<Page> probeInput = rowPagesBuilder(SINGLE_VARBINARY)
                .row("a")
                .row("b")
                .row("c")
                .build();
        HashJoinOperatorFactory joinOperatorFactory = HashJoinOperator.outerJoin(
                0,
                hashBuilderOperatorFactory.getHashSupplier(),
                ImmutableList.of(SINGLE_VARBINARY),
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, VARIABLE_BINARY))
                .row("a", "a")
                .row("a", "a")
View Full Code Here

Examples of com.facebook.presto.operator.HashJoinOperator.HashJoinOperatorFactory

                .row("a")
                .row("b")
                .row((String) null)
                .row("c")
                .build();
        HashJoinOperatorFactory joinOperatorFactory = HashJoinOperator.outerJoin(
                0,
                hashBuilderOperatorFactory.getHashSupplier(),
                ImmutableList.of(SINGLE_VARBINARY),
                0);
        Operator joinOperator = joinOperatorFactory.createOperator(taskContext.addPipelineContext(true, true).addDriverContext());

        // expected
        MaterializedResult expected = resultBuilder(new TupleInfo(VARIABLE_BINARY, VARIABLE_BINARY))
                .row("a", "a")
                .row("a", "a")
View Full Code Here

Examples of com.facebook.presto.operator.HashJoinOperator.HashJoinOperatorFactory

        BlockIterable lineItemOrderKey = getBlockIterable("lineitem", "orderkey", BlocksFileEncoding.RAW);
        BlockIterable lineNumber = getBlockIterable("lineitem", "quantity", BlocksFileEncoding.RAW);
        AlignmentOperatorFactory lineItemTableScan = new AlignmentOperatorFactory(0, lineItemOrderKey, lineNumber);

        HashJoinOperatorFactory joinOperator = HashJoinOperator.innerJoin(1, hashSupplier, lineItemTableScan.getTupleInfos(), 0);

        NullOutputOperatorFactory output = new NullOutputOperatorFactory(2, joinOperator.getTupleInfos());

        DriverFactory driverFactory = new DriverFactory(true, true, lineItemTableScan, joinOperator, output);
        DriverContext driverContext = taskContext.addPipelineContext(true, true).addDriverContext();
        Driver driver = driverFactory.createDriver(driverContext);
        return ImmutableList.of(driver);
View Full Code Here

Examples of com.facebook.presto.operator.HashJoinOperator.HashJoinOperatorFactory

        // join
        BlockIterable lineItemOrderKey = getBlockIterable("lineitem", "orderkey", BlocksFileEncoding.RAW);
        BlockIterable lineNumber = getBlockIterable("lineitem", "quantity", BlocksFileEncoding.RAW);
        AlignmentOperatorFactory lineItemTableScan = new AlignmentOperatorFactory(0, lineItemOrderKey, lineNumber);

        HashJoinOperatorFactory joinOperator = HashJoinOperator.innerJoin(1, hashBuilder.getHashSupplier(), lineItemTableScan.getTupleInfos(), 0);

        NullOutputOperatorFactory output = new NullOutputOperatorFactory(2, joinOperator.getTupleInfos());

        DriverFactory joinDriverFactory = new DriverFactory(true, true, lineItemTableScan, joinOperator, output);
        Driver joinDriver = joinDriverFactory.createDriver(taskContext.addPipelineContext(true, true).addDriverContext());

        return ImmutableList.of(hashBuildDriver, joinDriver);
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.