Skip to content

query failed when some fields not exist against DOE #3479

Description

@BabySid

Describe the bug
query failed when i run sql against doris on es. The prompt error is "inner hits node is not an array"

e.g.

CREATE EXTERNAL TABLE `case_replay_for_milimin` (
  `k1` varchar(20) NULL COMMENT "",
  `k2` varchar(20) NULL COMMENT "",
  `k3` varchar(20) NULL COMMENT "", 
) ENGINE=ELASTICSEARCH
COMMENT "ELASTICSEARCH"
PROPERTIES (
"hosts" = "...",
...
"enable_docvalue_scan" = "true"
)

This Table has rows like below :

> select  k1 from table;
+------+
| k1   |
+------+
| NULL |
| kkk1 |
| NULL |
+------+

but, actually it returns a error:

> select  k1 from table;
ERROR 1064 (HY000): inner hits node is not an array

To Reproduce
Steps to reproduce the behavior:

  1. put values into index
PUT myindex/_doc/1
{
  "k1": "kkk1"
}
PUT myindex/_doc/2
{
  "k2": "kkk2"
}
PUT myindex/_doc/3
{
  "k3": "kkk3"
}

2、fetch fields contain k1,k2,k3. e.g. select k1,k2,k3 from table;

Expected behavior
ignore this situation and return ok

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/doris-on-esIssues or PRs related to Doris on ElasticSearchkind/fixCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions