Examples of SortItem


Examples of com.facebook.presto.sql.tree.SortItem

        return ImmutableList.<Relation>of(new TableSubquery(query));
    }

    public static SortItem ascending(String name)
    {
        return new SortItem(nameReference(name), SortItem.Ordering.ASCENDING, SortItem.NullOrdering.UNDEFINED);
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.SortItem

        return ImmutableList.<Relation>of(new TableSubquery(query));
    }

    public static SortItem ascending(String name)
    {
        return new SortItem(nameReference(name), SortItem.Ordering.ASCENDING, SortItem.NullOrdering.UNDEFINED);
    }
View Full Code Here

Examples of de.linwave.gtm.sort.SortItem

        Object[] arr = new Object[lastQueue.size() - 1];
        int idx = 0;
        for (Long oid : lastQueue) {
          if (oid != GTM.END_OF_QUEUE) {
            String globalName = GlobalName.buildGlobalName(clasz, oid, constraint.field);
            SortItem item = new SortItem(oid, fi.typeHandler.get(gtm.GET(globalName)));
            arr[idx++] = item;
          }
        }

        // Sort the array
View Full Code Here

Examples of org.exist.indexing.sort.SortItem

        for (SequenceIterator nodesIter = args[1].iterate(); nodesIter.hasNext(); ) {
            NodeValue nv = (NodeValue) nodesIter.nextItem();
            if (nv.getImplementationType() == NodeValue.IN_MEMORY_NODE)
                throw new XPathException(this, "Cannot create order-index on an in-memory node");
            NodeProxy node = (NodeProxy) nv;
            SortItem si = new SortItemImpl(node);
         
           
           
            if (LOG.isDebugEnabled() && ++c % logChunk == 0) {
            LOG.debug("Storing item " + c + " out of " + len + " to sort index.");
            }
           
            if (call != null) {
                // call the callback function to get value
                params[0] = node;
                Sequence r = call.evalFunction(contextSequence, null, params);
                if (!r.isEmpty()) {
                    AtomicValue v = r.itemAt(0).atomize();
                    if (v.getType() == Type.UNTYPED_ATOMIC)
                        v = v.convertTo(Type.STRING);
                    si.setValue(v);
                }
            } else {
                // no callback, take value from second sequence
                AtomicValue v = valuesIter.nextItem().atomize();
                if (v.getType() == Type.UNTYPED_ATOMIC)
                    v = v.convertTo(Type.STRING);
                si.setValue(v);
            }
            items.add(si);
        }
        // sort the set
        FastQSort.sort(items, 0, items.size() - 1);
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.