SaintBacchus commented on code in PR #16806:
URL: https://github.com/apache/doris/pull/16806#discussion_r1111407554


##########
fe/fe-core/src/main/java/org/apache/doris/external/elasticsearch/EsUtil.java:
##########
@@ -239,6 +217,69 @@ public static List<Column> genColumnsFromEs(EsRestClient 
client, String indexNam
         return columns;
     }
 
+
+    /**
+     * Generate columns from ES Cluster.
+     * Add mappingEsId config in es external catalog.
+     **/
+    public static List<Column> genColumnsFromEs(EsRestClient client, String 
indexName, String mappingType,
+            boolean mappingEsId) {
+        String mapping = client.getMapping(indexName);
+        ObjectNode mappingProps = getMappingProps(indexName, mapping, 
mappingType);
+        List<String> arrayFields = getArrayFields(mapping);
+        return genColumnsFromEs(mappingProps, arrayFields, mappingEsId);
+    }
+
+    private static final List<String> ALLOW_DATE_FORMATS = 
Lists.newArrayList("yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd",

Review Comment:
   These should be mention in the doc.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to