blackfox1983 commented on a change in pull request #3454:
URL: https://github.com/apache/incubator-doris/pull/3454#discussion_r442682248



##########
File path: 
fe/src/main/java/org/apache/doris/external/elasticsearch/EsFieldInfos.java
##########
@@ -0,0 +1,160 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.external.elasticsearch;
+
+import org.apache.doris.catalog.Column;
+import org.apache.doris.catalog.EsTable;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.json.JSONObject;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+public class EsFieldInfos {
+    
+    private static final Logger LOG = LogManager.getLogger(EsFieldInfos.class);
+    
+    private Map<String, String> fieldsContext;
+    
+    private Map<String, String> docValueContext;
+    
+    public EsFieldInfos(Map<String, String> fieldsContext, Map<String, String> 
docValueContext) {
+        this.fieldsContext = fieldsContext;
+        this.docValueContext = docValueContext;
+    }
+    
+    public Map<String, String> getFieldsContext() {
+        return fieldsContext;
+    }
+    
+    public Map<String, String> getDocValueContext() {
+        return docValueContext;
+    }
+    
+    /**
+     * Parse the required field information from the json
+     * @param colList table column
+     * @param indexName indexName(alias or really name)
+     * @param indexMapping the return value of _mapping
+     * @param mappingType indexType
+     * @return fieldsContext and docValueContext
+     * @throws Exception
+     */
+    public static EsFieldInfos fromMapping(List<Column> colList, String 
indexName, String indexMapping, String mappingType) throws 
ExternalDataSourceException {

Review comment:
       mappingType应该没有这个词。Es是docType?




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