You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "libenchao (via GitHub)" <gi...@apache.org> on 2023/03/19 05:33:51 UTC

[GitHub] [calcite] libenchao commented on a diff in pull request #3120: [CALCITE-5593] Support for search queries using aliases

libenchao commented on code in PR #3120:
URL: https://github.com/apache/calcite/pull/3120#discussion_r1141261572


##########
elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchSchema.java:
##########
@@ -120,7 +120,9 @@ private Set<String> indicesFromElastic() throws IOException {
         throw new IllegalStateException(message);
       }
 
+      Set<String> aliases = Sets.newHashSet(root.findPath("aliases").fieldNames());
       Set<String> indices = Sets.newHashSet(root.fieldNames());
+      indices.addAll(aliases);

Review Comment:
   I'm not familiar with es adapter, but is it possible to add a unit test to show that it only works after this change?



-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org