qidaye commented on code in PR #11547:
URL: https://github.com/apache/doris/pull/11547#discussion_r939676905


##########
fe/fe-core/src/test/resources/data/es/es7_aliases_mapping.json:
##########
@@ -0,0 +1,50 @@
+{
+  "test2_202207": {
+    "mappings": {

Review Comment:
   Where is `aliases` field?



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/EsExternalDataSource.java:
##########
@@ -166,7 +167,10 @@ public List<String> listDatabaseNames(SessionContext ctx) {
 
     @Override
     public List<String> listTableNames(SessionContext ctx, String dbName) {
-        return esRestClient.getIndexes();
+        List<String> indexes = 
esRestClient.getIndexes().stream().distinct().collect(Collectors.toList());
+        esRestClient.getAliases().entrySet().stream().filter(e -> 
indexes.contains(e.getKey()))

Review Comment:
   Do we treat `alias` as an independent index?
   Should we keep the correspondence between the alias and the real index?



-- 
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-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to