asereda-gs commented on a change in pull request #1180: [CALCITE-3023] Upgrade 
to Elasticsearch 7.0.0
URL: https://github.com/apache/calcite/pull/1180#discussion_r284036895
 
 

 ##########
 File path: 
elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchJson.java
 ##########
 @@ -265,12 +265,69 @@ Duration took() {
       return this.hits;
     }
 
-    public long total() {
+    public SearchTotal total() {
       return total;
     }
 
   }
 
+  /**
+   * Container for total hits
+   */
+  @JsonDeserialize(using = SearchTotalDeserializer.class)
+  static class SearchTotal {
+
+    private final long value;
+    private final String relation;
+
+    SearchTotal(final long value, final String relation) {
+      this.value = value;
+      this.relation = relation;
+    }
+
+    public long value() {
+      return value;
+    }
+
+    public String relation() {
 
 Review comment:
   return `Optional` if it can be nullable.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to