Examples of OpOrder


Examples of com.hp.hpl.jena.sparql.algebra.op.OpOrder

   
   
    @Override
    public Op transform(OpDistinct opDistinct, Op subOp) {
       
        OpOrder opOrder = null ;
        Set<Var> projectVars = null ;
        /*   SELECT DISTINCT * {} ORDER BY
         * giving an alegbra expression of the form: 
         *   (distinct
         *     (order
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.op.OpOrder

            return super.transform(opSlice, subOp) ;
           
        if ( subOp instanceof OpOrder )
        {
            // First case: slice-order
            OpOrder opOrder = (OpOrder)subOp ;
            OpTopN opTopN = new OpTopN( opOrder.getSubOp(), (int)(offset+opSlice.getLength()), opOrder.getConditions() ) ;
            if ( offset == 0 ) {
                return opTopN ;
            } else {
                return new OpSlice( opTopN, offset, Query.NOLIMIT ) ;                 
            }
        }

        if ( subOp instanceof OpDistinct || subOp instanceof OpReduced )
        {
            // Second case: slice-distinct-order or slice-reduced-order
            Op subSubOp = ((Op1)subOp).getSubOp() ;
            if ( subSubOp instanceof OpOrder ) {
                OpOrder opOrder = (OpOrder)subSubOp ;
                Op opDistinct2 = OpDistinct.create(opOrder.getSubOp()) ;
                OpTopN opTopN = new OpTopN( opDistinct2, (int)(offset+opSlice.getLength()), opOrder.getConditions() ) ;
                if ( offset == 0 ) {
                    return opTopN ;
                } else {
                    return new OpSlice( opTopN, offset, Query.NOLIMIT ) ;                      
                }
            }
        }

        if ( subOp instanceof OpProject )
        {
            // Third case: slice-project-order
            Op subSubOp = ((Op1)subOp).getSubOp() ;
            if ( subSubOp instanceof OpOrder )
            {
                OpProject opProject = (OpProject)subOp ;
                OpOrder opOrder = (OpOrder)subSubOp ;
                // NB leave project over topN, unlike the distinct case where distinct goes under topN.
                OpTopN opTopN = new OpTopN( opOrder.getSubOp(), (int)(offset+opSlice.getLength()), opOrder.getConditions() ) ;
                Op proj = new OpProject(opTopN, opProject.getVars()) ;
                if ( offset == 0 ) {
                    return proj ;
                } else {
                    return new OpSlice( proj, offset, Query.NOLIMIT ) ;                      
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.op.OpOrder

    {
        List<SortCondition> conditions = NodeTransformLib.transform(transform, opOrder.getConditions()) ;
       
        if ( conditions == opOrder.getConditions() )
            return super.transform(opOrder, subOp) ;
        return new OpOrder(subOp, conditions) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.op.OpOrder

    //@Override
    public Op transform1(OpDistinct opDistinct, Op subOp) {
        if (subOp instanceof OpProject) {
            OpProject opProject = (OpProject) subOp;
            if (opProject.getSubOp() instanceof OpOrder) {
                OpOrder opOrder = (OpOrder) opProject.getSubOp();
                Set<Var> projectVars = new HashSet<Var>(opProject.getVars()) ;
                if (isSafe(projectVars, opOrder)) {
                    return OpReduced.create(subOp);
                }
            }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.op.OpOrder

   
   
    @Override
    public Op transform(OpDistinct opDistinct, Op subOp) {
       
        OpOrder opOrder = null ;
        Set<Var> projectVars = null ;
        /*   SELECT DISTINCT * {} ORDER BY
         * giving an alegbra expression of the form: 
         *   (distinct
         *     (order
View Full Code Here

Examples of org.apache.cassandra.utils.concurrent.OpOrder

    private static final Pool POOL = new HeapPool(Integer.MAX_VALUE, 1f, null);

    /** Allocates 1 byte from a new SlabAllocator and returns it. */
    private AbstractAllocator bumpedSlab()
    {
        AbstractAllocator allocator = POOL.newAllocator(new OpOrder());
        allocator.allocate(1);
        return allocator;
    }
View Full Code Here

Examples of org.apache.cassandra.utils.concurrent.OpOrder

    }

    private static int estimateRowOverhead(final int count)
    {
        // calculate row overhead
        final OpOrder.Group group = new OpOrder().start();
        int rowOverhead;
        MemtableAllocator allocator = MEMORY_POOL.newAllocator();
        ConcurrentNavigableMap<RowPosition, Object> rows = new ConcurrentSkipListMap<>();
        final Object val = new Object();
        for (int i = 0 ; i < count ; i++)
View Full Code Here

Examples of org.apache.cassandra.utils.concurrent.OpOrder

    }

    private static int estimateRowOverhead(final int count)
    {
        // calculate row overhead
        final OpOrder.Group group = new OpOrder().start();
        int rowOverhead;
        MemtableAllocator allocator = MEMORY_POOL.newAllocator();
        ConcurrentNavigableMap<RowPosition, Object> rows = new ConcurrentSkipListMap<>();
        final Object val = new Object();
        for (int i = 0 ; i < count ; i++)
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.