Examples of LookupSourceFactory


Examples of com.facebook.presto.sql.gen.JoinCompiler.LookupSourceFactory

    {
        DriverContext driverContext = taskContext.addPipelineContext(true, true).addDriverContext();
        OperatorContext operatorContext = driverContext.addOperatorContext(0, ValuesOperator.class.getSimpleName());
        JoinCompiler joinCompiler = new JoinCompiler();
        ImmutableList<Type> types = ImmutableList.<Type>of(VARCHAR);
        LookupSourceFactory lookupSourceFactoryFactory = joinCompiler.compileLookupSourceFactory(types, Ints.asList(0));

        // crate hash strategy with a single channel blocks -- make sure there is some overlap in values
        List<Block> channel = ImmutableList.of(
                BlockAssertions.createStringSequenceBlock(10, 20),
                BlockAssertions.createStringSequenceBlock(20, 30),
                BlockAssertions.createStringSequenceBlock(15, 25));
        LongArrayList addresses = new LongArrayList();
        for (int blockIndex = 0; blockIndex < channel.size(); blockIndex++) {
            Block block = channel.get(blockIndex);
            for (int positionIndex = 0; positionIndex < block.getPositionCount(); positionIndex++) {
                addresses.add(encodeSyntheticAddress(blockIndex, positionIndex));
            }
        }
        LookupSource lookupSource = lookupSourceFactoryFactory.createLookupSource(addresses, types, ImmutableList.of(channel), operatorContext);

        JoinProbeCompiler joinProbeCompiler = new JoinProbeCompiler();
        JoinProbeFactory probeFactory = joinProbeCompiler.internalCompileJoinProbe(types, Ints.asList(0));

        Page page = SequencePageBuilder.createSequencePage(types, 10, 10);
View Full Code Here

Examples of com.facebook.presto.sql.gen.JoinCompiler.LookupSourceFactory

    }

    public LookupSource createLookupSource(List<Integer> joinChannels)
    {
        try {
            LookupSourceFactory lookupSourceFactory = joinCompiler.compileLookupSourceFactory(types, joinChannels);
            LookupSource lookupSource = lookupSourceFactory.createLookupSource(
                    valueAddresses,
                    ImmutableList.<List<Block>>copyOf(channels),
                    operatorContext);

            return lookupSource;
View Full Code Here

Examples of com.facebook.presto.sql.gen.JoinCompiler.LookupSourceFactory

            throws Exception
    {
        DriverContext driverContext = taskContext.addPipelineContext(true, true).addDriverContext();
        OperatorContext operatorContext = driverContext.addOperatorContext(0, ValuesOperator.class.getSimpleName());
        JoinCompiler joinCompiler = new JoinCompiler();
        LookupSourceFactory lookupSourceFactoryFactory = joinCompiler.compileLookupSourceFactory(ImmutableList.of(VARCHAR), Ints.asList(0));

        // crate hash strategy with a single channel blocks -- make sure there is some overlap in values
        List<RandomAccessBlock> channel = ImmutableList.of(
                BlockAssertions.createStringSequenceBlock(10, 20).toRandomAccessBlock(),
                BlockAssertions.createStringSequenceBlock(20, 30).toRandomAccessBlock(),
                BlockAssertions.createStringSequenceBlock(15, 25).toRandomAccessBlock());
        LongArrayList addresses = new LongArrayList();
        for (int blockIndex = 0; blockIndex < channel.size(); blockIndex++) {
            RandomAccessBlock block = channel.get(blockIndex);
            for (int positionIndex = 0; positionIndex < block.getPositionCount(); positionIndex++) {
                addresses.add(encodeSyntheticAddress(blockIndex, positionIndex));
            }
        }
        LookupSource lookupSource = lookupSourceFactoryFactory.createLookupSource(addresses, ImmutableList.of(channel), operatorContext);

        JoinProbeCompiler joinProbeCompiler = new JoinProbeCompiler();
        JoinProbeFactory probeFactory = joinProbeCompiler.internalCompileJoinProbe(1, Ints.asList(0));

        Page page = SequencePageBuilder.createSequencePage(ImmutableList.of(VARCHAR), 10, 10);
View Full Code Here

Examples of com.facebook.presto.sql.gen.JoinCompiler.LookupSourceFactory

    }

    public LookupSource createLookupSource(List<Integer> joinChannels)
    {
        try {
            LookupSourceFactory lookupSourceFactory = joinCompiler.compileLookupSourceFactory(types, joinChannels);
            LookupSource lookupSource = lookupSourceFactory.createLookupSource(
                    valueAddresses,
                    ImmutableList.<List<RandomAccessBlock>>copyOf(channels),
                    operatorContext);

            return lookupSource;
View Full Code Here

Examples of com.facebook.presto.sql.gen.JoinCompiler.LookupSourceFactory

    }

    public LookupSource createLookupSource(List<Integer> joinChannels)
    {
        try {
            LookupSourceFactory lookupSourceFactory = joinCompiler.compileLookupSourceFactory(types, joinChannels);
            LookupSource lookupSource = lookupSourceFactory.createLookupSource(
                    valueAddresses,
                    ImmutableList.<List<Block>>copyOf(channels),
                    operatorContext);

            return lookupSource;
View Full Code Here

Examples of com.facebook.presto.sql.gen.JoinCompiler.LookupSourceFactory

    {
        DriverContext driverContext = taskContext.addPipelineContext(true, true).addDriverContext();
        OperatorContext operatorContext = driverContext.addOperatorContext(0, ValuesOperator.class.getSimpleName());
        JoinCompiler joinCompiler = new JoinCompiler();
        ImmutableList<Type> types = ImmutableList.<Type>of(VARCHAR);
        LookupSourceFactory lookupSourceFactoryFactory = joinCompiler.compileLookupSourceFactory(types, Ints.asList(0));

        // crate hash strategy with a single channel blocks -- make sure there is some overlap in values
        List<Block> channel = ImmutableList.of(
                BlockAssertions.createStringSequenceBlock(10, 20),
                BlockAssertions.createStringSequenceBlock(20, 30),
                BlockAssertions.createStringSequenceBlock(15, 25));
        LongArrayList addresses = new LongArrayList();
        for (int blockIndex = 0; blockIndex < channel.size(); blockIndex++) {
            Block block = channel.get(blockIndex);
            for (int positionIndex = 0; positionIndex < block.getPositionCount(); positionIndex++) {
                addresses.add(encodeSyntheticAddress(blockIndex, positionIndex));
            }
        }
        LookupSource lookupSource = lookupSourceFactoryFactory.createLookupSource(addresses, types, ImmutableList.of(channel), operatorContext);

        JoinProbeCompiler joinProbeCompiler = new JoinProbeCompiler();
        JoinProbeFactory probeFactory = joinProbeCompiler.internalCompileJoinProbe(types, Ints.asList(0));

        Page page = SequencePageBuilder.createSequencePage(types, 10, 10);
View Full Code Here

Examples of com.facebook.presto.sql.gen.JoinCompiler.LookupSourceFactory

            throws Exception
    {
        DriverContext driverContext = taskContext.addPipelineContext(true, true).addDriverContext();
        OperatorContext operatorContext = driverContext.addOperatorContext(0, ValuesOperator.class.getSimpleName());
        JoinCompiler joinCompiler = new JoinCompiler();
        LookupSourceFactory lookupSourceFactoryFactory = joinCompiler.compileLookupSourceFactory(ImmutableList.of(VARCHAR), Ints.asList(0));

        // crate hash strategy with a single channel blocks -- make sure there is some overlap in values
        List<RandomAccessBlock> channel = ImmutableList.of(
                BlockAssertions.createStringSequenceBlock(10, 20).toRandomAccessBlock(),
                BlockAssertions.createStringSequenceBlock(20, 30).toRandomAccessBlock(),
                BlockAssertions.createStringSequenceBlock(15, 25).toRandomAccessBlock());
        LongArrayList addresses = new LongArrayList();
        for (int blockIndex = 0; blockIndex < channel.size(); blockIndex++) {
            RandomAccessBlock block = channel.get(blockIndex);
            for (int positionIndex = 0; positionIndex < block.getPositionCount(); positionIndex++) {
                addresses.add(encodeSyntheticAddress(blockIndex, positionIndex));
            }
        }
        LookupSource lookupSource = lookupSourceFactoryFactory.createLookupSource(addresses, ImmutableList.of(channel), operatorContext);

        JoinProbeCompiler joinProbeCompiler = new JoinProbeCompiler();
        JoinProbeFactory probeFactory = joinProbeCompiler.internalCompileJoinProbe(1, Ints.asList(0));

        Page page = SequencePageBuilder.createSequencePage(ImmutableList.of(VARCHAR), 10, 10);
View Full Code Here

Examples of com.facebook.presto.sql.gen.JoinCompiler.LookupSourceFactory

    }

    public LookupSource createLookupSource(List<Integer> joinChannels)
    {
        try {
            LookupSourceFactory lookupSourceFactory = joinCompiler.compileLookupSourceFactory(types, joinChannels);

            ImmutableList.Builder<Type> joinChannelTypes = ImmutableList.builder();
            for (Integer joinChannel : joinChannels) {
                joinChannelTypes.add(types.get(joinChannel));
            }
            LookupSource lookupSource = lookupSourceFactory.createLookupSource(
                    valueAddresses,
                    joinChannelTypes.build(),
                    ImmutableList.<List<Block>>copyOf(channels),
                    operatorContext);
View Full Code Here

Examples of com.facebook.presto.sql.gen.JoinCompiler.LookupSourceFactory

    }

    public LookupSource createLookupSource(List<Integer> joinChannels)
    {
        try {
            LookupSourceFactory lookupSourceFactory = joinCompiler.compileLookupSourceFactory(types, joinChannels);
            LookupSource lookupSource = lookupSourceFactory.createLookupSource(
                    valueAddresses,
                    ImmutableList.<List<RandomAccessBlock>>copyOf(channels),
                    operatorContext);

            return lookupSource;
View Full Code Here

Examples of com.facebook.presto.sql.gen.JoinCompiler.LookupSourceFactory

            throws Exception
    {
        DriverContext driverContext = taskContext.addPipelineContext(true, true).addDriverContext();
        OperatorContext operatorContext = driverContext.addOperatorContext(0, ValuesOperator.class.getSimpleName());
        JoinCompiler joinCompiler = new JoinCompiler();
        LookupSourceFactory lookupSourceFactoryFactory = joinCompiler.compileLookupSourceFactory(ImmutableList.of(VARCHAR), Ints.asList(0));

        // crate hash strategy with a single channel blocks -- make sure there is some overlap in values
        List<Block> channel = ImmutableList.of(
                BlockAssertions.createStringSequenceBlock(10, 20),
                BlockAssertions.createStringSequenceBlock(20, 30),
                BlockAssertions.createStringSequenceBlock(15, 25));
        LongArrayList addresses = new LongArrayList();
        for (int blockIndex = 0; blockIndex < channel.size(); blockIndex++) {
            Block block = channel.get(blockIndex);
            for (int positionIndex = 0; positionIndex < block.getPositionCount(); positionIndex++) {
                addresses.add(encodeSyntheticAddress(blockIndex, positionIndex));
            }
        }
        LookupSource lookupSource = lookupSourceFactoryFactory.createLookupSource(addresses, ImmutableList.of(channel), operatorContext);

        JoinProbeCompiler joinProbeCompiler = new JoinProbeCompiler();
        JoinProbeFactory probeFactory = joinProbeCompiler.internalCompileJoinProbe(1, Ints.asList(0));

        Page page = SequencePageBuilder.createSequencePage(ImmutableList.of(VARCHAR), 10, 10);
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.