Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] ES Catalog Query Error #40406

Closed
3 tasks done
sunny19930321 opened this issue Sep 5, 2024 · 1 comment · Fixed by #40614
Closed
3 tasks done

[Bug] ES Catalog Query Error #40406

sunny19930321 opened this issue Sep 5, 2024 · 1 comment · Fixed by #40614

Comments

@sunny19930321
Copy link
Contributor

sunny19930321 commented Sep 5, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Version

2.1.6

What's Wrong?

ERROR 1105 (HY000): errCode = 2, detailMessage = (9.134.114.29)[CANCELLED]Expected value of type: STRING; but found type: Array; Document slice is : []

What You Expected?

normal query

How to Reproduce?

create es index

curl -XPUT -u elastic:Admin@123 "http://******:9200/es_table1" -H "Content-Type:application/json" -d '{
   "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0,
    "index": {
     "max_result_window": 864000000
    }
   },
   "mappings": {
    "dynamic": "true",
    "properties": {
     "id": {
      "type": "long"
     },
     "uuid": {
      "type": "keyword"
     },
     "version": {
      "type": "keyword"
     },
     "reserve": {
      "type": "keyword"
     }
    }
   }
  }'

query es data, version fields exist as arrays and strings

curl  -X GET -u elastic:Admin@123 "http://******:9200/es_table1/_search?pretty"
{
  "took" : 0,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 3,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "es_table1",
        "_type" : "_doc",
        "_id" : "1",
        "_score" : 1.0,
        "_source" : {
          "id" : 0
        }
      },
      {
        "_index" : "es_table1",
        "_type" : "_doc",
        "_id" : "2",
        "_score" : 1.0,
        "_source" : {
          "id" : 1,
          "uuid" : "111",
          "version": "1111"
        }
      },
      {
        "_index" : "es_table1",
        "_type" : "_doc",
        "_id" : "3",
        "_score" : 1.0,
        "_source" : {
          "id" : 2,
          "uuid" : "[]",
          "version" : [ ],
          "reserve" : [ ]
        }
      }
    ]
  }
}

create catalog

CREATE CATALOG `es_catalog1` PROPERTIES (
"password" = "Admin@123",
"mapping_es_id" = "true",
"type" = "es",
"user" = "elastic",
"hosts" = "http://****:9200",
"nodes_discovery"='false'
);

mysql> select * from es_catalog1.default_db.es_table1;
ERROR 1105 (HY000): errCode = 2, detailMessage = (9.134.114.29)[CANCELLED]Expected value of type: STRING; but found type: Array; Document slice is : []

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@sunny19930321 sunny19930321 changed the title [Bug] ES Catalog Keywords [Bug] ES Catalog Keywords,Query Error Sep 5, 2024
@sunny19930321 sunny19930321 changed the title [Bug] ES Catalog Keywords,Query Error [Bug] ES Catalog Query Error Sep 5, 2024
@qidaye
Copy link
Contributor

qidaye commented Sep 10, 2024

It's a known issue.
Currently array and string both existing in one field is not supported.
We will support later.

@qidaye qidaye closed this as completed in d8c34be Sep 11, 2024
qidaye added a commit to qidaye/incubator-doris that referenced this issue Sep 11, 2024
…40614)

Follow up apache#39104, when the field has one value and we map it as array
type in Doris, we parse the single value to a single element array to
make them queryable.

close apache#40406
qidaye added a commit to qidaye/incubator-doris that referenced this issue Sep 11, 2024
…40614)

Follow up apache#39104, when the field has one value and we map it as array
type in Doris, we parse the single value to a single element array to
make them queryable.

close apache#40406
qidaye added a commit to qidaye/incubator-doris that referenced this issue Sep 11, 2024
…40614)

Follow up apache#39104, when the field has one value and we map it as array
type in Doris, we parse the single value to a single element array to
make them queryable.

close apache#40406
qidaye added a commit to qidaye/incubator-doris that referenced this issue Sep 11, 2024
…40614)

Follow up apache#39104, when the field has one value and we map it as array
type in Doris, we parse the single value to a single element array to
make them queryable.

close apache#40406
dataroaring pushed a commit that referenced this issue Oct 9, 2024
Follow up #39104, when the field has one value and we map it as array
type in Doris, we parse the single value to a single element array to
make them queryable.

close #40406
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants