Package org.apache.druid.sql.calcite.rel
Class Sorting
java.lang.Object
org.apache.druid.sql.calcite.rel.Sorting
Represents Druid's concept of sorting and limiting, including post-sort projections. The sorting and limiting piece
may map onto multiple Druid concepts: LimitSpec (for groupBy), TopNMetricSpec and threshold (for topN),
"descending" (for timeseries), or ScanQuery.Order (for scan). The post-sort projections will map onto either
post-aggregations (for query types that aggregate) or virtual columns (for query types that don't).
This corresponds to a Calcite Sort + optional Project.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Sortingcreate(List<OrderByColumnSpec> orderBys, OffsetLimit offsetLimit, Projection projection) booleanorg.apache.druid.sql.calcite.rel.Sorting.SortKindgetTimeSortKind(String timeColumn) inthashCode()Returns a LimitSpec that encapsulates the orderBys, offset, and limit of this Sorting instance.static Sortingnone()toString()
-
Method Details
-
create
public static Sorting create(List<OrderByColumnSpec> orderBys, OffsetLimit offsetLimit, @Nullable Projection projection) -
none
-
getTimeSortKind
-
getOrderBys
-
getProjection
-
getOffsetLimit
-
limitSpec
Returns a LimitSpec that encapsulates the orderBys, offset, and limit of this Sorting instance. Does not encapsulate the projection at all; you must still callgetProjection()for that. -
equals
-
hashCode
public int hashCode() -
toString
-