Examples of DualPartition


Examples of com.facebook.presto.connector.dual.DualSplitManager.DualPartition

                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(scanAssignments.get(A), Domain.singleValue(1L))),
                        ImmutableList.<Partition>of(new DualPartition()))));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(normalizeConjuncts(effectivePredicate), normalizeConjuncts(equals(number(1L), AE)));

        // tupleDomainInput with descriptive partitions
        node = new TableScanNode(
                newId(),
                new DualTableHandle("default"),
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(scanAssignments.get(A), Domain.singleValue(1L))),
                        ImmutableList.<Partition>of(tupleDomainPartition(TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(
                                scanAssignments.get(A), Domain.singleValue(1L),
                                scanAssignments.get(B), Domain.singleValue(2L))))))));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(normalizeConjuncts(effectivePredicate), normalizeConjuncts(equals(number(2L), BE), equals(number(1L), AE)));

        // generic tupleDomainInput with no matching partitions
        node = new TableScanNode(
                newId(),
                new DualTableHandle("default"),
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.all(),
                        ImmutableList.<Partition>of())));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(effectivePredicate, BooleanLiteral.FALSE_LITERAL);

        // generic tupleDomainInput with non-descriptive partitions
        node = new TableScanNode(
                newId(),
                new DualTableHandle("default"),
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.all(),
                        ImmutableList.<Partition>of(new DualPartition()))));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(effectivePredicate, BooleanLiteral.TRUE_LITERAL);

        // generic tupleDomainInput with descriptive partitions
        node = new TableScanNode(
View Full Code Here

Examples of com.facebook.presto.connector.dual.DualSplitManager.DualPartition

                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(scanAssignments.get(A), Domain.singleValue(1L))),
                        ImmutableList.<Partition>of(new DualPartition()))));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(normalizeConjuncts(effectivePredicate), normalizeConjuncts(equals(number(1L), AE)));

        // tupleDomainInput with descriptive partitions
        node = new TableScanNode(
                newId(),
                new DualTableHandle("default"),
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(scanAssignments.get(A), Domain.singleValue(1L))),
                        ImmutableList.<Partition>of(tupleDomainPartition(TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(
                                scanAssignments.get(A), Domain.singleValue(1L),
                                scanAssignments.get(B), Domain.singleValue(2L))))))));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(normalizeConjuncts(effectivePredicate), normalizeConjuncts(equals(number(2L), BE), equals(number(1L), AE)));

        // generic tupleDomainInput with no matching partitions
        node = new TableScanNode(
                newId(),
                new DualTableHandle("default"),
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.all(),
                        ImmutableList.<Partition>of())));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(effectivePredicate, BooleanLiteral.FALSE_LITERAL);

        // generic tupleDomainInput with non-descriptive partitions
        node = new TableScanNode(
                newId(),
                new DualTableHandle("default"),
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.all(),
                        ImmutableList.<Partition>of(new DualPartition()))));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(effectivePredicate, BooleanLiteral.TRUE_LITERAL);

        // generic tupleDomainInput with descriptive partitions
        node = new TableScanNode(
View Full Code Here

Examples of com.facebook.presto.connector.dual.DualSplitManager.DualPartition

                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(scanAssignments.get(A), Domain.singleValue(1L))),
                        ImmutableList.<Partition>of(new Partition(DualConnector.CONNECTOR_ID, new DualPartition())))));
        effectivePredicate = EffectivePredicateExtractor.extract(node, TYPES);
        Assert.assertEquals(normalizeConjuncts(effectivePredicate), normalizeConjuncts(equals(number(1L), AE)));

        // tupleDomainInput with descriptive partitions
        node = new TableScanNode(
                newId(),
                DUAL_TABLE_HANDLE,
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(scanAssignments.get(A), Domain.singleValue(1L))),
                        ImmutableList.<Partition>of(tupleDomainPartition(DualConnector.CONNECTOR_ID,
                                TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(
                                        scanAssignments.get(A), Domain.singleValue(1L),
                                        scanAssignments.get(B), Domain.singleValue(2L))))))));
        effectivePredicate = EffectivePredicateExtractor.extract(node, TYPES);
        Assert.assertEquals(normalizeConjuncts(effectivePredicate), normalizeConjuncts(equals(number(2L), BE), equals(number(1L), AE)));

        // generic tupleDomainInput with no matching partitions
        node = new TableScanNode(
                newId(),
                DUAL_TABLE_HANDLE,
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.<ColumnHandle>all(),
                        ImmutableList.<Partition>of())));
        effectivePredicate = EffectivePredicateExtractor.extract(node, TYPES);
        Assert.assertEquals(effectivePredicate, BooleanLiteral.FALSE_LITERAL);

        // generic tupleDomainInput with non-descriptive partitions
        node = new TableScanNode(
                newId(),
                DUAL_TABLE_HANDLE,
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.<ColumnHandle>all(),
                        ImmutableList.<Partition>of(new Partition(DualConnector.CONNECTOR_ID, new DualPartition())))));
        effectivePredicate = EffectivePredicateExtractor.extract(node, TYPES);
        Assert.assertEquals(effectivePredicate, BooleanLiteral.TRUE_LITERAL);

        // generic tupleDomainInput with descriptive partitions
        node = new TableScanNode(
View Full Code Here

Examples of com.facebook.presto.connector.dual.DualSplitManager.DualPartition

                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(scanAssignments.get(A), Domain.singleValue(1L))),
                        ImmutableList.<Partition>of(new DualPartition()))));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(normalizeConjuncts(effectivePredicate), normalizeConjuncts(equals(number(1L), AE)));

        // tupleDomainInput with descriptive partitions
        node = new TableScanNode(
                newId(),
                new DualTableHandle("default"),
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(scanAssignments.get(A), Domain.singleValue(1L))),
                        ImmutableList.<Partition>of(tupleDomainPartition(TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(
                                scanAssignments.get(A), Domain.singleValue(1L),
                                scanAssignments.get(B), Domain.singleValue(2L))))))));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(normalizeConjuncts(effectivePredicate), normalizeConjuncts(equals(number(2L), BE), equals(number(1L), AE)));

        // generic tupleDomainInput with no matching partitions
        node = new TableScanNode(
                newId(),
                new DualTableHandle("default"),
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.all(),
                        ImmutableList.<Partition>of())));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(effectivePredicate, BooleanLiteral.FALSE_LITERAL);

        // generic tupleDomainInput with non-descriptive partitions
        node = new TableScanNode(
                newId(),
                new DualTableHandle("default"),
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.all(),
                        ImmutableList.<Partition>of(new DualPartition()))));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(effectivePredicate, BooleanLiteral.TRUE_LITERAL);

        // generic tupleDomainInput with descriptive partitions
        node = new TableScanNode(
View Full Code Here

Examples of com.facebook.presto.connector.dual.DualSplitManager.DualPartition

                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(scanAssignments.get(A), Domain.singleValue(1L))),
                        ImmutableList.<Partition>of(new DualPartition()))));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(normalizeConjuncts(effectivePredicate), normalizeConjuncts(equals(number(1L), AE)));

        // tupleDomainInput with descriptive partitions
        node = new TableScanNode(
                newId(),
                new DualTableHandle("default"),
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(scanAssignments.get(A), Domain.singleValue(1L))),
                        ImmutableList.<Partition>of(tupleDomainPartition(TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of(
                                scanAssignments.get(A), Domain.singleValue(1L),
                                scanAssignments.get(B), Domain.singleValue(2L))))))));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(normalizeConjuncts(effectivePredicate), normalizeConjuncts(equals(number(2L), BE), equals(number(1L), AE)));

        // generic tupleDomainInput with no matching partitions
        node = new TableScanNode(
                newId(),
                new DualTableHandle("default"),
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.all(),
                        ImmutableList.<Partition>of())));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(effectivePredicate, BooleanLiteral.FALSE_LITERAL);

        // generic tupleDomainInput with non-descriptive partitions
        node = new TableScanNode(
                newId(),
                new DualTableHandle("default"),
                ImmutableList.copyOf(assignments.keySet()),
                assignments,
                null,
                Optional.<GeneratedPartitions>of(new GeneratedPartitions(
                        TupleDomain.all(),
                        ImmutableList.<Partition>of(new DualPartition()))));
        effectivePredicate = EffectivePredicateExtractor.extract(node);
        Assert.assertEquals(effectivePredicate, BooleanLiteral.TRUE_LITERAL);

        // generic tupleDomainInput with descriptive partitions
        node = new TableScanNode(
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.