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 Unknown table 'default_db.test_indexx1'. #49681

Open
Jin-H opened this issue Aug 10, 2024 · 0 comments · May be fixed by #49949
Open

[BUG] es catalog Unknown table 'default_db.test_indexx1'. #49681

Jin-H opened this issue Aug 10, 2024 · 0 comments · May be fixed by #49949
Labels
type/bug Something isn't working

Comments

@Jin-H
Copy link
Contributor

Jin-H commented Aug 10, 2024

Steps to reproduce the behavior (Required)

  1. create es catalog
CREATE EXTERNAL CATALOG es7
COMMENT 'es7'
PROPERTIES
(
    "type" = "es",
    "hosts" = "http://ip:9200",
    "es.type" = "_doc"
);
  1. show tables
show tables from es7.default_db;

image

  1. query table
select * from es7.default_db.test_indexx1

image

  1. error log
2024-08-10 15:45:57.815+08:00 INFO (starrocks-mysql-nio-pool-2|150) [MetadataMgr$QueryMetadatas.getConnectorMetadata():107] Succeed to register query level connector metadata [catalog:es7, queryId: 94a9051d-56ec-11ef-87c5-8e7f870c087f]
2024-08-10 15:45:57.826+08:00 ERROR (starrocks-mysql-nio-pool-2|150) [ElasticsearchMetadata.toEsTable():94] transform to EsTable Error
java.lang.ClassCastException: class org.json.JSONArray cannot be cast to class org.json.JSONObject (org.json.JSONArray and org.json.JSONObject are in unnamed module of loader 'app')
        at com.starrocks.connector.elasticsearch.EsUtil.parsePropertiesRoot(EsUtil.java:238) ~[starrocks-fe.jar:?]
        at com.starrocks.connector.elasticsearch.EsUtil.parseProperties(EsUtil.java:203) ~[starrocks-fe.jar:?]
        at com.starrocks.connector.elasticsearch.EsUtil.convertColumnSchema(EsUtil.java:122) ~[starrocks-fe.jar:?]
        at com.starrocks.connector.elasticsearch.ElasticsearchMetadata.toEsTable(ElasticsearchMetadata.java:83) ~[starrocks-fe.jar:?]
        at com.starrocks.connector.elasticsearch.ElasticsearchMetadata.getTable(ElasticsearchMetadata.java:76) ~[starrocks-fe.jar:?]
        at com.starrocks.connector.CatalogConnectorMetadata.getTable(CatalogConnectorMetadata.java:134) ~[starrocks-fe.jar:?]
        at com.starrocks.server.MetadataMgr.lambda$getTable$5(MetadataMgr.java:485) ~[starrocks-fe.jar:?]
        at java.util.Optional.map(Optional.java:265) ~[?:?]

Expected behavior (Required)

query can be executed.

Real behavior (Required)

StarRocks version (Required)

  • 3.3.0-19a3f66
@Jin-H Jin-H added the type/bug Something isn't working label Aug 10, 2024
@Jin-H Jin-H linked a pull request Aug 19, 2024 that will close this issue
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
1 participant