qidaye opened a new issue, #14761:
URL: https://github.com/apache/doris/issues/14761

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   12791f1c79adfce78fa5df2c99e6ce0257f618a6
   
   ### What's Wrong?
   
   ES external table dose not query normally.
   
   ### What You Expected?
   
   Query normally.
   
   ### How to Reproduce?
   
   1. create ES index 
   ```json
   curl -X PUT "localhost:9201/test?pretty" -H 'Content-Type: application/json' 
-d'
   {
     "mappings": {
         "dynamic_templates" : [
           {
             "message_full" : {
               "match" : "message_full",
               "mapping" : {
                 "fields" : {
                   "keyword" : {
                     "ignore_above" : 2048,
                     "type" : "keyword"
                   }
                 },
                 "type" : "text"
               }
             }
           },
           {
             "message" : {
               "match" : "message",
               "mapping" : {
                 "type" : "text"
               }
             }
           },
           {
             "strings" : {
               "match_mapping_type" : "string",
               "mapping" : {
                 "type" : "keyword"
               }
             }
           }
         ], 
         "properties": { 
           "title":    { "type": "text" ,"fields": {
             "keyword": {
             "ignore_above": 256,
             "type": "keyword"
             }
             } }, 
           "name":     { "type": "text"  }, 
           "age":      { "type": "integer" }
         }
       
     }
   }
   '
   ```
   2. create Doris ES external table
   ```sql
   CREATE EXTERNAL TABLE `es` (
   `name` varchar(20) COMMENT "",
   `age` varchar(20) COMMENT ""
   ) ENGINE=ELASTICSEARCH
   PROPERTIES (
   "hosts" = "http://localhost:9201";,
   "index" = "test"
   );
   ```
   3. query es table
   4. get error
   ```
   ERROR 1105 (HY000): errCode = 2, detailMessage = fetch es table [es] 
metadata failure: org.json.simple.JSONArray cannot be cast to 
org.json.simple.JSONObject
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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