Class Order.Ordering
java.lang.Object
org.apache.drill.common.logical.data.Order.Ordering
- Enclosing class:
- Order
Representation of a SQL <sort specification>.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionOrdering
(String strOrderingSpec, LogicalExpression expr, String strNullOrdering) Constructs a sort specification.Ordering
(org.apache.calcite.rel.RelFieldCollation.Direction direction, LogicalExpression e) Ordering
(org.apache.calcite.rel.RelFieldCollation.Direction direction, LogicalExpression e, org.apache.calcite.rel.RelFieldCollation.NullDirection nullOrdering) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.calcite.rel.RelFieldCollation.Direction
getExpr()
org.apache.calcite.rel.RelFieldCollation.NullDirection
static org.apache.calcite.rel.RelFieldCollation.NullDirection
getNullOrderingFromString
(String strNullOrdering) getOrder()
static org.apache.calcite.rel.RelFieldCollation.Direction
getOrderingSpecFromString
(String strDirection) boolean
Reports whether NULL sorts high or low in this ordering.toString()
-
Field Details
-
ORDER_ASC
- See Also:
-
ORDER_DESC
- See Also:
-
ORDER_ASCENDING
- See Also:
-
ORDER_DESCENDING
- See Also:
-
NULLS_FIRST
- See Also:
-
NULLS_LAST
- See Also:
-
NULLS_UNSPECIFIED
- See Also:
-
-
Constructor Details
-
Ordering
Constructs a sort specification.- Parameters:
expr
- ...strOrderingSpec
- the <ordering specification> as string; allowed values:"ASC"
,"DESC"
,null
; null specifies default <ordering specification> ("ASC"
/RelFieldCollation.Direction.ASCENDING
)strNullOrdering
- the <null ordering> as string; allowed values:"FIRST"
,"LAST"
,"UNSPECIFIED"
,null
; null specifies default <null ordering> (omitted /RelFieldCollation.NullDirection.UNSPECIFIED
, interpreted later)
-
Ordering
public Ordering(org.apache.calcite.rel.RelFieldCollation.Direction direction, LogicalExpression e, org.apache.calcite.rel.RelFieldCollation.NullDirection nullOrdering) -
Ordering
-
-
Method Details
-
getOrderingSpecFromString
public static org.apache.calcite.rel.RelFieldCollation.Direction getOrderingSpecFromString(String strDirection) -
getNullOrderingFromString
public static org.apache.calcite.rel.RelFieldCollation.NullDirection getNullOrderingFromString(String strNullOrdering) -
toString
-
getDirection
public org.apache.calcite.rel.RelFieldCollation.Direction getDirection() -
getExpr
-
getOrder
-
getNullDirection
public org.apache.calcite.rel.RelFieldCollation.NullDirection getNullDirection() -
nullsSortHigh
public boolean nullsSortHigh()Reports whether NULL sorts high or low in this ordering.- Returns:
true
if NULL sorts higher than any other value;false
if NULL sorts lower than any other value
-