jerryleooo commented on a change in pull request #1813: [CALCITE-3802] Fix
elasticsearch fetch mapping
URL: https://github.com/apache/calcite/pull/1813#discussion_r381052278
##########
File path:
elasticsearch/src/main/java/org/apache/calcite/adapter/elasticsearch/ElasticsearchTransport.java
##########
@@ -118,7 +120,14 @@ private ElasticsearchVersion version() {
* Build index mapping returning new instance of {@link
ElasticsearchMapping}.
*/
private ElasticsearchMapping fetchAndCreateMapping() {
- final String uri = String.format(Locale.ROOT, "/%s/_mapping", indexName);
+ String encodedIndexName = indexName;
+ try {
+ encodedIndexName = URLEncoder.encode(indexName,
StandardCharsets.UTF_8.toString());
+ } catch (Exception e) {
Review comment:
Good idea, will see how to implement.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services