stalary commented on code in PR #11340:
URL: https://github.com/apache/doris/pull/11340#discussion_r939816612
##########
fe/fe-core/src/main/java/org/apache/doris/external/elasticsearch/EsUtil.java:
##########
@@ -132,16 +133,33 @@ public static boolean getBoolean(Map<String, String>
properties, String name) th
}
}
- /**
- * Get mapping properties JSONObject.
- **/
- public static JSONObject getMappingProps(String sourceIndex, String
indexMapping, String mappingType) {
+ public static List<String> getArrayFields(String indexMapping) {
+ JSONObject mappings = getMapping(indexMapping);
+ if (!mappings.containsKey("_meta")) {
+ return new ArrayList<>();
+ }
+ JSONObject meta = (JSONObject) mappings.get("_meta");
+ if (!meta.containsKey("doris")) {
+ return new ArrayList<>();
+ }
+ JSONObject dorisMeta = (JSONObject) meta.get("doris");
Review Comment:
In the automatic table creation scenario, users are required to create
special mappings for the array fields. trino use it `JsonNode metaNode =
nullSafeNode(mappings, "_meta");
JsonNode metaProperties = nullSafeNode(metaNode, "trino");`
--
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]