ILuffZhe commented on a change in pull request #2657:
URL: https://github.com/apache/calcite/pull/2657#discussion_r781711267



##########
File path: 
elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchRel.java
##########
@@ -54,6 +55,12 @@
      */
     final List<Map.Entry<String, RelFieldCollation.Direction>> sort = new 
ArrayList<>();
 
+    /**
+     * Sorting missing values.
+     * @see <a 
href="https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html#_missing_values";>Missing
 Values</a>
+     */
+    final Map<String, RelFieldCollation.NullDirection> nullsSort = new 
HashMap<>();

Review comment:
       While sorting duplicated columns, the latter ones will be treated as 
redundant.
   Since sort and nulls sort are corresponding for one field, I've changed the 
Collection to store NULLS SORT DIRECTION. Thanks @NobiGo .




-- 
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]


Reply via email to