You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if you could use a list of ordering options instead of a single order. This is useful for when you need a secondary sort because the first one is of low cardinality.
Doesn't seem too hard to add after looking at the code. InternalOrder could be extended with with a class called InternalOrderChain that can take a list of InternalOrder objects in it's constructor. The comparator could use Guava's Ordering.compound:
protected Comparator<Bucket> comparator(final Aggregator aggregator) {
return Ordering.compound(FluentIterable
.from(orders)
.transform(new Function<InternalOrder, Comparator<? super Bucket>>() {
@Override public Comparator<? super Bucket> apply(InternalOrder input) {
return input.comparator(aggregator);
}
})
.toList()
);
}
The only thing that's a bit strange is the InternalOrder.Streams handling and any check to see if the InternalOrder is an Aggregation...
The text was updated successfully, but these errors were encountered:
It would be nice if you could use a list of ordering options instead of a single order. This is useful for when you need a secondary sort because the first one is of low cardinality.
Doesn't seem too hard to add after looking at the code.
InternalOrder
could be extended with with a class calledInternalOrderChain
that can take a list ofInternalOrder
objects in it's constructor. Thecomparator
could use Guava'sOrdering.compound
:The only thing that's a bit strange is the
InternalOrder.Streams
handling and any check to see if theInternalOrder
is anAggregation
...The text was updated successfully, but these errors were encountered: