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

    https://github.com/apache/metamodel/pull/177#discussion_r163751042
  
    --- Diff: 
elasticsearch/common/src/main/java/org/apache/metamodel/elasticsearch/AbstractElasticSearchDataContext.java
 ---
    @@ -0,0 +1,149 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.metamodel.elasticsearch;
    +
    +import java.util.ArrayList;
    +import java.util.Arrays;
    +import java.util.Collections;
    +import java.util.List;
    +
    +import org.apache.metamodel.DataContext;
    +import org.apache.metamodel.MetaModelException;
    +import org.apache.metamodel.QueryPostprocessDataContext;
    +import org.apache.metamodel.UpdateableDataContext;
    +import org.apache.metamodel.elasticsearch.common.ElasticSearchUtils;
    +import org.apache.metamodel.schema.Column;
    +import org.apache.metamodel.schema.MutableColumn;
    +import org.apache.metamodel.schema.MutableSchema;
    +import org.apache.metamodel.schema.MutableTable;
    +import org.apache.metamodel.schema.Schema;
    +import org.apache.metamodel.util.SimpleTableDef;
    +import org.elasticsearch.common.unit.TimeValue;
    +
    +public abstract class AbstractElasticSearchDataContext extends 
QueryPostprocessDataContext implements DataContext,
    +        UpdateableDataContext {
    +
    +    public static final TimeValue TIMEOUT_SCROLL = 
TimeValue.timeValueSeconds(60);
    +
    +    protected final Object elasticSearchClient;
    --- End diff --
    
    There doesn't seem to be any reason to keep this in the abstract class any 
more, since the `Object` type removes any kind of possibility of reusing it. 
It's used differently in the two subtypes, so I suggest they each just have a 
field for the client object with a type that they need.


---

Reply via email to