snuyanzin commented on code in PR #27929:
URL: https://github.com/apache/flink/pull/27929#discussion_r3081116143
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/TableSemantics.java:
##########
@@ -116,4 +128,39 @@ public interface TableSemantics {
* type inference phase as the changelog mode is still unknown.
*/
Optional<ChangelogMode> changelogMode();
+
+ /** Sort direction for ORDER BY columns in table arguments with set
semantics. */
+ enum SortDirection implements Serializable {
+ /** Ascending order with nulls first. */
+ ASC_NULLS_FIRST(false, true),
+ /** Ascending order with nulls last. */
+ ASC_NULLS_LAST(false, false),
+ /** Descending order with nulls first. */
+ DESC_NULLS_FIRST(true, true),
+ /** Descending order with nulls last. */
+ DESC_NULLS_LAST(true, false);
+
+ private final boolean descending;
+ private final boolean nullsFirst;
Review Comment:
can we instead reuse Calcite's `Direction`
https://github.com/apache/calcite/blob/0ce0c5ae2f7055f13551ebcde8e1aaa2ff17b469/core/src/main/java/org/apache/calcite/rel/RelFieldCollation.java#L54
?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]