Github user LosD commented on a diff in the pull request:

    https://github.com/apache/metamodel/pull/98#discussion_r61166829
  
    --- Diff: 
elasticsearch/native/src/main/java/org/apache/metamodel/elasticsearch/nativeclient/ElasticSearchCreateTableBuilder.java
 ---
    @@ -44,15 +44,20 @@ public 
ElasticSearchCreateTableBuilder(ElasticSearchUpdateCallback updateCallbac
         @Override
         public Table execute() throws MetaModelException {
             final MutableTable table = getTable();
    -        final List<Object> sourceProperties = 
ElasticSearchUtils.getSourceProperties(table);
    +        final Object source = ElasticSearchUtils.getMappingSource(table);
     
             final ElasticSearchDataContext dataContext = 
getUpdateCallback().getDataContext();
             final IndicesAdminClient indicesAdmin = 
dataContext.getElasticSearchClient().admin().indices();
             final String indexName = dataContext.getIndexName();
     
             final PutMappingRequestBuilder requestBuilder = new 
PutMappingRequestBuilder(indicesAdmin)
                     .setIndices(indexName).setType(table.getName());
    -        requestBuilder.setSource(sourceProperties.toArray());
    +        if (source instanceof Map) {
    --- End diff --
    
    I'm obviously missing something, but it seems to me to always be a `Map`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to