You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Danny Chen (Jira)" <ji...@apache.org> on 2020/02/20 05:16:00 UTC
[jira] [Commented] (CALCITE-3802) Calcite Elasticsearch adapter
should encode the URI before send the request
[ https://issues.apache.org/jira/browse/CALCITE-3802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17040636#comment-17040636 ]
Danny Chen commented on CALCITE-3802:
-------------------------------------
Is this issue planning to be included in 1.22 ?
> Calcite Elasticsearch adapter should encode the URI before send the request
> ---------------------------------------------------------------------------
>
> Key: CALCITE-3802
> URL: https://issues.apache.org/jira/browse/CALCITE-3802
> Project: Calcite
> Issue Type: Bug
> Components: elasticsearch-adapter
> Affects Versions: 1.21.0
> Reporter: jerryleooo
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.22.0
>
> Attachments: image-2020-02-17-16-09-20-794.png
>
> Original Estimate: 1h
> Time Spent: 10m
> Remaining Estimate: 50m
>
> In [https://github.com/apache/calcite/blob/master/elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchTransport.java#L121] when the indexName has some special characters, the request will fail for Elasticsearch server returning HTTP 400 error.
>
> {code:java}
> val connection = DriverManager.getConnection("jdbc:calcite:")
> val calciteConnection = connection.asInstanceOf[CalciteConnection]
> val rootSchema = calciteConnection.getRootSchema()
> val esProperties = new util.HashMap[String, AnyRef]()
> esProperties.put("coordinates", "{'elasticsearch url': 80}")
> rootSchema.add("es", new ElasticsearchSchemaFactory().create(rootSchema, "es", esProperties))
> {code}
> !image-2020-02-17-16-09-20-794.png!
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)